From 34ddf57e56bb033a4f587c7670898322cd076d6f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:46:34 -0800 Subject: [PATCH] feat: [dialogflow-cx] added Generator API (#4837) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add agent answer feedback capability feat: add fields for supporting barge-in in StreamingDetectIntent API feat: add end_user_metadata to QueryParameters feat: add boost & bury and filter ES controls PiperOrigin-RevId: 583522403 Source-Link: https://github.com/googleapis/googleapis/commit/86c7ca69c44af41ec74dcdcbdb350181c10c8a2a Source-Link: https://github.com/googleapis/googleapis-gen/commit/42f2c6e979a1d2a6faedd772e23d49e6ef019470 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjQyZjJjNmU5NzlhMWQyYTZmYWVkZDc3MmUyM2Q0OWU2ZWYwMTk0NzAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add agent answer feedback capability feat: add fields for supporting barge-in in StreamingDetectIntent API feat: add end_user_metadata to QueryParameters feat: add boost & bury and filter ES controls PiperOrigin-RevId: 583523426 Source-Link: https://github.com/googleapis/googleapis/commit/c73d0da5e88f795958a4306efe367ff193013c08 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b5ed29498b34e1016e1f69ecb2808168bd34d15 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjFiNWVkMjk0OThiMzRlMTAxNmUxZjY5ZWNiMjgwODE2OGJkMzRkMTUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added Generator API docs: updated doc for speech model PiperOrigin-RevId: 586288282 Source-Link: https://github.com/googleapis/googleapis/commit/17d36c49769ddc4b2d2cbb45c1032c3f064cea2a Source-Link: https://github.com/googleapis/googleapis-gen/commit/e2fb5babfec92f75f17f31f90b65ba5ff3d69095 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImUyZmI1YmFiZmVjOTJmNzVmMTdmMzFmOTBiNjViYTVmZjNkNjkwOTUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added Generator API docs: updated doc for speech mode PiperOrigin-RevId: 586469693 Source-Link: https://github.com/googleapis/googleapis/commit/e8148d6d4bb02c907e06a784848ef731acb9e258 Source-Link: https://github.com/googleapis/googleapis-gen/commit/85136bd04383ed7172bb18b7b8d220dd7ff6b3a0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijg1MTM2YmQwNDM4M2VkNzE3MmJiMThiN2I4ZDIyMGRkN2ZmNmIzYTAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-dialogflow-cx/README.md | 12 + .../google/cloud/dialogflow/cx/v3/agent.proto | 13 + .../cloud/dialogflow/cx/v3/audio_config.proto | 47 +- .../cloud/dialogflow/cx/v3/entity_type.proto | 18 +- .../cloud/dialogflow/cx/v3/generator.proto | 240 + .../cloud/dialogflow/cx/v3/session.proto | 196 + .../cloud/dialogflow/cx/v3beta1/agent.proto | 13 + .../dialogflow/cx/v3beta1/audio_config.proto | 47 +- .../dialogflow/cx/v3beta1/entity_type.proto | 18 +- .../dialogflow/cx/v3beta1/generator.proto | 241 + .../cloud/dialogflow/cx/v3beta1/session.proto | 196 + .../protos/protos.d.ts | 17688 ++-- .../protos/protos.js | 72200 +++++++++------- .../protos/protos.json | 1210 +- .../samples/README.md | 216 + .../v3/generators.create_generator.js | 73 + .../v3/generators.delete_generator.js | 73 + .../generated/v3/generators.get_generator.js | 67 + .../v3/generators.list_generators.js | 77 + .../v3/generators.update_generator.js | 70 + .../v3/sessions.submit_answer_feedback.js | 77 + ...etadata_google.cloud.dialogflow.cx.v3.json | 392 +- .../v3beta1/generators.create_generator.js | 73 + .../v3beta1/generators.delete_generator.js | 73 + .../v3beta1/generators.get_generator.js | 67 + .../v3beta1/generators.list_generators.js | 77 + .../v3beta1/generators.update_generator.js | 70 + .../sessions.submit_answer_feedback.js | 77 + ...ta_google.cloud.dialogflow.cx.v3beta1.json | 392 +- .../google-cloud-dialogflow-cx/src/index.ts | 4 + .../src/v3/agents_client.ts | 73 + .../src/v3/agents_proto_list.json | 1 + .../src/v3/changelogs_client.ts | 73 + .../src/v3/changelogs_proto_list.json | 1 + .../src/v3/deployments_client.ts | 73 + .../src/v3/deployments_proto_list.json | 1 + .../src/v3/entity_types_client.ts | 75 +- .../src/v3/entity_types_client_config.json | 10 +- .../src/v3/entity_types_proto_list.json | 1 + .../src/v3/environments_client.ts | 73 + .../src/v3/environments_proto_list.json | 1 + .../src/v3/experiments_client.ts | 73 + .../src/v3/experiments_proto_list.json | 1 + .../src/v3/flows_client.ts | 73 + .../src/v3/flows_proto_list.json | 1 + .../src/v3/gapic_metadata.json | 78 + .../src/v3/generators_client.ts | 3167 + .../src/v3/generators_client_config.json | 54 + .../src/v3/generators_proto_list.json | 30 + .../src/v3/index.ts | 1 + .../src/v3/intents_client.ts | 73 + .../src/v3/intents_proto_list.json | 1 + .../src/v3/pages_client.ts | 73 + .../src/v3/pages_proto_list.json | 1 + .../v3/security_settings_service_client.ts | 73 + .../security_settings_service_proto_list.json | 1 + .../src/v3/session_entity_types_client.ts | 73 + .../v3/session_entity_types_proto_list.json | 1 + .../src/v3/sessions_client.ts | 336 + .../src/v3/sessions_client_config.json | 5 + .../src/v3/sessions_proto_list.json | 1 + .../src/v3/test_cases_client.ts | 73 + .../src/v3/test_cases_proto_list.json | 1 + .../src/v3/transition_route_groups_client.ts | 73 + .../transition_route_groups_proto_list.json | 1 + .../src/v3/versions_client.ts | 73 + .../src/v3/versions_proto_list.json | 1 + .../src/v3/webhooks_client.ts | 73 + .../src/v3/webhooks_proto_list.json | 1 + .../src/v3beta1/agents_client.ts | 73 + .../src/v3beta1/agents_proto_list.json | 1 + .../src/v3beta1/changelogs_client.ts | 73 + .../src/v3beta1/changelogs_proto_list.json | 1 + .../src/v3beta1/deployments_client.ts | 73 + .../src/v3beta1/deployments_proto_list.json | 1 + .../src/v3beta1/entity_types_client.ts | 75 +- .../v3beta1/entity_types_client_config.json | 10 +- .../src/v3beta1/entity_types_proto_list.json | 1 + .../src/v3beta1/environments_client.ts | 73 + .../src/v3beta1/environments_proto_list.json | 1 + .../src/v3beta1/experiments_client.ts | 73 + .../src/v3beta1/experiments_proto_list.json | 1 + .../src/v3beta1/flows_client.ts | 73 + .../src/v3beta1/flows_proto_list.json | 1 + .../src/v3beta1/gapic_metadata.json | 78 + .../src/v3beta1/generators_client.ts | 2966 + .../src/v3beta1/generators_client_config.json | 54 + .../src/v3beta1/generators_proto_list.json | 30 + .../src/v3beta1/index.ts | 1 + .../src/v3beta1/intents_client.ts | 73 + .../src/v3beta1/intents_proto_list.json | 1 + .../src/v3beta1/pages_client.ts | 73 + .../src/v3beta1/pages_proto_list.json | 1 + .../security_settings_service_client.ts | 73 + .../security_settings_service_proto_list.json | 1 + .../v3beta1/session_entity_types_client.ts | 73 + .../session_entity_types_proto_list.json | 1 + .../src/v3beta1/sessions_client.ts | 336 + .../src/v3beta1/sessions_client_config.json | 5 + .../src/v3beta1/sessions_proto_list.json | 1 + .../src/v3beta1/test_cases_client.ts | 73 + .../src/v3beta1/test_cases_proto_list.json | 1 + .../v3beta1/transition_route_groups_client.ts | 73 + .../transition_route_groups_proto_list.json | 1 + .../src/v3beta1/versions_client.ts | 73 + .../src/v3beta1/versions_proto_list.json | 1 + .../src/v3beta1/webhooks_client.ts | 73 + .../src/v3beta1/webhooks_proto_list.json | 1 + .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/fixtures/sample/src/index.ts | 7 + .../test/gapic_agents_v3.ts | 76 + .../test/gapic_agents_v3beta1.ts | 76 + .../test/gapic_changelogs_v3.ts | 76 + .../test/gapic_changelogs_v3beta1.ts | 76 + .../test/gapic_deployments_v3.ts | 76 + .../test/gapic_deployments_v3beta1.ts | 76 + .../test/gapic_entity_types_v3.ts | 76 + .../test/gapic_entity_types_v3beta1.ts | 76 + .../test/gapic_environments_v3.ts | 76 + .../test/gapic_environments_v3beta1.ts | 76 + .../test/gapic_experiments_v3.ts | 76 + .../test/gapic_experiments_v3beta1.ts | 76 + .../test/gapic_flows_v3.ts | 76 + .../test/gapic_flows_v3beta1.ts | 76 + .../test/gapic_generators_v3.ts | 3714 + .../test/gapic_generators_v3beta1.ts | 3415 + .../test/gapic_intents_v3.ts | 76 + .../test/gapic_intents_v3beta1.ts | 76 + .../test/gapic_pages_v3.ts | 76 + .../test/gapic_pages_v3beta1.ts | 76 + .../gapic_security_settings_service_v3.ts | 77 + ...gapic_security_settings_service_v3beta1.ts | 79 + .../test/gapic_session_entity_types_v3.ts | 76 + .../gapic_session_entity_types_v3beta1.ts | 77 + .../test/gapic_sessions_v3.ts | 387 + .../test/gapic_sessions_v3beta1.ts | 387 + .../test/gapic_test_cases_v3.ts | 76 + .../test/gapic_test_cases_v3beta1.ts | 76 + .../test/gapic_transition_route_groups_v3.ts | 77 + .../gapic_transition_route_groups_v3beta1.ts | 77 + .../test/gapic_versions_v3.ts | 76 + .../test/gapic_versions_v3beta1.ts | 76 + .../test/gapic_webhooks_v3.ts | 76 + .../test/gapic_webhooks_v3beta1.ts | 76 + 144 files changed, 75697 insertions(+), 37905 deletions(-) create mode 100644 packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto create mode 100644 packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/generator.proto create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js create mode 100644 packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js create mode 100644 packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts create mode 100644 packages/google-cloud-dialogflow-cx/src/v3/generators_client_config.json create mode 100644 packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json create mode 100644 packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts create mode 100644 packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client_config.json create mode 100644 packages/google-cloud-dialogflow-cx/src/v3beta1/generators_proto_list.json create mode 100644 packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts create mode 100644 packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts diff --git a/packages/google-cloud-dialogflow-cx/README.md b/packages/google-cloud-dialogflow-cx/README.md index c88d7cdabeb..9b65d239765 100644 --- a/packages/google-cloud-dialogflow-cx/README.md +++ b/packages/google-cloud-dialogflow-cx/README.md @@ -184,6 +184,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.create_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.delete_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.get_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.list_generators | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.update_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.export_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.export_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.export_intents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | @@ -210,6 +215,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.submit_answer_feedback | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js,packages/google-cloud-dialogflow-cx/samples/README.md) | @@ -285,6 +291,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.create_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.delete_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.get_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.list_generators | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Generators.update_generator | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Intents.export_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.export_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.export_intents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | @@ -311,6 +322,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.submit_answer_feedback | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | | Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js,packages/google-cloud-dialogflow-cx/samples/README.md) | 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 7a086796fce..9a937500c12 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 @@ -245,6 +245,15 @@ message Agent { string engine = 1 [(google.api.field_behavior) = REQUIRED]; } + // Settings for answer feedback collection. + message AnswerFeedbackSettings { + // Optional. If enabled, end users will be able to provide + // [answer feedback][google.cloud.dialogflow.cx.v3.AnswerFeedback] to + // Dialogflow responses. Feature works only if interaction logging is + // enabled in the Dialogflow agent. + bool enable_answer_feedback = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] @@ -335,6 +344,10 @@ message Agent { // Gen App Builder-related agent-level settings. optional GenAppBuilderSettings gen_app_builder_settings = 33; + + // Optional. Answer feedback collection settings. + AnswerFeedbackSettings answer_feedback_settings = 38 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for 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 7f18827cb96..84f5052f758 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 @@ -151,6 +151,39 @@ message SpeechWordInfo { float confidence = 4; } +// Configuration of the barge-in behavior. Barge-in instructs the API to return +// a detected utterance at a proper time while the client is playing back the +// response audio from a previous request. When the client sees the +// utterance, it should stop the playback and immediately get ready for +// receiving the responses for the current request. +// +// The barge-in handling requires the client to start streaming audio input +// as soon as it starts playing back the audio from the previous response. The +// playback is modeled into two phases: +// +// * No barge-in phase: which goes first and during which speech detection +// should not be carried out. +// +// * Barge-in phase: which follows the no barge-in phase and during which +// the API starts speech detection and may inform the client that an utterance +// has been detected. Note that no-speech event is not expected in this +// phase. +// +// The client provides this configuration in terms of the durations of those +// two phases. The durations are measured in terms of the audio length from the +// the start of the input audio. +// +// No-speech event is a response with END_OF_UTTERANCE without any transcript +// following up. +message BargeInConfig { + // Duration that is not eligible for barge-in at the beginning of the input + // audio. + google.protobuf.Duration no_barge_in_duration = 1; + + // Total duration for the playback at the beginning of the input audio. + google.protobuf.Duration total_duration = 2; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -181,8 +214,8 @@ message InputAudioConfig { // Optional. Which Speech model to select for the given request. Select the // model best suited to your domain to get best results. If a model is not - // explicitly specified, then we auto-select a model based on the parameters - // in the InputAudioConfig. + // explicitly specified, then Dialogflow auto-selects a model based on other + // parameters in the InputAudioConfig and Agent settings. // If enhanced speech model is enabled for the agent and an enhanced // version of the specified model for the language does not exist, then the // speech is recognized using the standard version of the specified model. @@ -195,7 +228,12 @@ message InputAudioConfig { // // - phone_call (best for Agent Assist and telephony) // - latest_short (best for Dialogflow non-telephony) - // - command_and_search (best for very short utterances and commands) + // - command_and_search + // + // Leave this field unspecified to use + // [Agent Speech + // settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) + // for model selection. string model = 7; // Optional. Which variant of the [Speech @@ -211,6 +249,9 @@ message InputAudioConfig { // needed. // Note: This setting is relevant only for streaming methods. bool single_utterance = 8; + + // Configuration of barge-in behavior during the streaming of input audio. + BargeInConfig barge_in_config = 15; } // Gender of the voice as described in 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 28b68b5d993..c3f6d2f3d69 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 @@ -39,15 +39,6 @@ service EntityTypes { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/dialogflow"; - // Returns the list of all entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) - returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" - }; - option (google.api.method_signature) = "parent"; - } - // Retrieves the specified entity type. rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { option (google.api.http) = { @@ -94,6 +85,15 @@ service EntityTypes { }; option (google.api.method_signature) = "name"; } + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) + returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + } } // Entities are extracted from user input and represent parameters that are 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 new file mode 100644 index 00000000000..ad83e0829f7 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/generator.proto @@ -0,0 +1,240 @@ +// Copyright 2023 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/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +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 = "GeneratorProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; + +// Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator] +service Generators { + 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"; + + // Returns the list of all generators in the specified agent. + rpc ListGenerators(ListGeneratorsRequest) returns (ListGeneratorsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/generators" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified generator. + rpc GetGenerator(GetGeneratorRequest) returns (Generator) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/generators/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a generator in the specified agent. + rpc CreateGenerator(CreateGeneratorRequest) returns (Generator) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/generators" + body: "generator" + }; + option (google.api.method_signature) = "parent,generator"; + } + + // Update the specified generator. + rpc UpdateGenerator(UpdateGeneratorRequest) returns (Generator) { + option (google.api.http) = { + patch: "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}" + body: "generator" + }; + option (google.api.method_signature) = "generator,update_mask"; + } + + // Deletes the specified generators. + rpc DeleteGenerator(DeleteGeneratorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/generators/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Generators contain prompt to be sent to the LLM model to generate text. The +// prompt can contain parameters which will be resolved before calling the +// model. It can optionally contain banned phrases to ensure the model responses +// are safe. +message Generator { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Generator" + pattern: "projects/{project}/locations/{location}/agents/{agent}/generators/{generator}" + }; + + // Represents a custom placeholder in the prompt text. + message Placeholder { + // Unique ID used to map custom placeholder to parameters in fulfillment. + string id = 1; + + // Custom placeholder value in the prompt text. + string name = 2; + } + + // The unique identifier of the generator. + // Must be set for the + // [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator] + // method. [Generators.CreateGenerate][] populates the name automatically. + // Format: `projects//locations//agents//generators/`. + string name = 1; + + // Required. The human-readable name of the generator, unique within the + // agent. The prompt contains pre-defined parameters such as $conversation, + // $last-user-utterance, etc. populated by Dialogflow. It can also contain + // custom placeholders which will be resolved during fulfillment. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Prompt for the LLM model. + Phrase prompt_text = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of custom placeholders in the prompt text. + repeated Placeholder placeholders = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Text input which can be used for prompt or banned phrases. +message Phrase { + // Required. Text input which can be used for prompt or banned phrases. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. +message ListGeneratorsRequest { + // Required. The agent to list all generators for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Generator" + } + ]; + + // The language to list generators for. + string language_code = 2; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3.Generators.ListGenerators]. +message ListGeneratorsResponse { + // The list of generators. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Generator generators = 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 +// [Generators.GetGenerator][google.cloud.dialogflow.cx.v3.Generators.GetGenerator]. +message GetGeneratorRequest { + // Required. The name of the generator. + // Format: `projects//locations//agents//generators/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Generator" + } + ]; + + // The language to list generators for. + string language_code = 2; +} + +// The request message for +// [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3.Generators.CreateGenerator]. +message CreateGeneratorRequest { + // Required. The agent to create a generator for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Generator" + } + ]; + + // Required. The generator to create. + Generator generator = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language to create generators for the following fields: + // * `Generator.prompt_text.text` + // If not specified, the agent's default language is used. + string language_code = 3; +} + +// The request message for +// [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator]. +message UpdateGeneratorRequest { + // Required. The generator to update. + Generator generator = 1 [(google.api.field_behavior) = REQUIRED]; + + // The language to list generators for. + string language_code = 2; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// The request message for +// [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator]. +message DeleteGeneratorRequest { + // Required. The name of the generator to delete. + // Format: `projects//locations//agents//generators/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Generator" + } + ]; + + // This field has no effect for generators not being used. + // For generators that are used by pages/flows/transition route groups: + // + // * 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 generator, as well + // as any references to the generator (i.e. + // [Generator][Fulfillment.generator]) in fulfillments. + bool force = 2; +} 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 9c322fd516f..5dcddf33040 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 @@ -27,6 +27,7 @@ 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/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; @@ -44,6 +45,11 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}" pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/DataStore" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the @@ -114,6 +120,78 @@ service Sessions { } }; } + + // Updates the feedback received from the user for a single turn of the bot + // response. + rpc SubmitAnswerFeedback(SubmitAnswerFeedbackRequest) + returns (AnswerFeedback) { + option (google.api.http) = { + post: "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback" + body: "*" + }; + } +} + +// Stores information about feedback provided by users about a response. +message AnswerFeedback { + // Represents thumbs up/down rating provided by user about a response. + enum Rating { + // Rating not specified. + RATING_UNSPECIFIED = 0; + + // Thumbs up feedback from user. + THUMBS_UP = 1; + + // Thumbs down feedback from user. + THUMBS_DOWN = 2; + } + + // Stores extra information about why users provided thumbs down rating. + message RatingReason { + // Optional. Custom reason labels for thumbs down rating provided by the + // user. The maximum number of labels allowed is 10 and the maximum length + // of a single label is 128 characters. + repeated string reason_labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional feedback about the rating. + // This field can be populated without choosing a predefined `reason`. + string feedback = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Rating from user for the specific Dialogflow response. + Rating rating = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. In case of thumbs down rating provided, users can optionally + // provide context about the rating. + RatingReason rating_reason = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom rating from the user about the provided answer, with + // maximum length of 1024 characters. For example, client could use a + // customized JSON object to indicate the rating. + string custom_rating = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to set the feedback for a bot answer. +message SubmitAnswerFeedbackRequest { + // Required. The name of the session the feedback was sent to. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // Required. ID of the response to update its feedback. This is the same as + // DetectIntentResponse.response_id. + string response_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feedback provided for a bot answer. + AnswerFeedback answer_feedback = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields to update. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The request to detect user's intent. @@ -607,6 +685,120 @@ message QueryParameters { // This value should be no longer than 1 day. google.protobuf.Duration session_ttl = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about the end-user to improve the relevance and + // accuracy of generative answers. + // + // This will be interpreted and used by a language model, so, for good + // results, the data should be self-descriptive, and in a simple structure. + // + // Example: + // + // ```json + // { + // "subscription plan": "Business Premium Plus", + // "devices owned": [ + // {"model": "Google Pixel 7"}, + // {"model": "Google Pixel Tablet"} + // ] + // } + // ``` + google.protobuf.Struct end_user_metadata = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Search configuration for UCS search queries. + SearchConfig search_config = 20 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search configuration for UCS search queries. +message SearchConfig { + // Optional. Boosting configuration for the datastores. + repeated BoostSpecs boost_specs = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter configuration for the datastores. + repeated FilterSpecs filter_specs = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specification to boost certain documents. +// A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation +// is available at +// https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec +message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // Optional. An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Condition boost specifications. If a document matches multiple + // conditions in the specifictions, boost scores from these specifications are + // all applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specifications for data stores. +message BoostSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. A list of boosting specifications. + repeated BoostSpec spec = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Filter specifications for data stores. +message FilterSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. The filter expression to be applied. + // Expression syntax is documented at + // https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; } // Represents the query input. It can contain one of: @@ -772,6 +964,10 @@ message QueryResult { // Dialogflow exports audio to Google Cloud Storage, then the client may need // to wait for the resulting object to appear in the bucket before proceeding. AdvancedSettings advanced_settings = 21; + + // Indicates whether the Thumbs up/Thumbs down rating controls are need to be + // shown for the response in the Dialogflow Messenger widget. + bool allow_answer_feedback = 32; } // Represents the natural language text to be processed. diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index 63a35608953..72b419c3c64 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -245,6 +245,15 @@ message Agent { string engine = 1 [(google.api.field_behavior) = REQUIRED]; } + // Settings for answer feedback collection. + message AnswerFeedbackSettings { + // Optional. If enabled, end users will be able to provide + // [answer feedback][google.cloud.dialogflow.cx.v3beta1.AnswerFeedback] to + // Dialogflow responses. Feature works only if interaction logging is + // enabled in the Dialogflow agent. + bool enable_answer_feedback = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The unique identifier of the agent. // Required for the // [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] @@ -335,6 +344,10 @@ message Agent { // Gen App Builder-related agent-level settings. optional GenAppBuilderSettings gen_app_builder_settings = 33; + + // Optional. Answer feedback collection settings. + AnswerFeedbackSettings answer_feedback_settings = 38 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index bea17e17a6c..fa3b35db3c8 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -151,6 +151,39 @@ message SpeechWordInfo { float confidence = 4; } +// Configuration of the barge-in behavior. Barge-in instructs the API to return +// a detected utterance at a proper time while the client is playing back the +// response audio from a previous request. When the client sees the +// utterance, it should stop the playback and immediately get ready for +// receiving the responses for the current request. +// +// The barge-in handling requires the client to start streaming audio input +// as soon as it starts playing back the audio from the previous response. The +// playback is modeled into two phases: +// +// * No barge-in phase: which goes first and during which speech detection +// should not be carried out. +// +// * Barge-in phase: which follows the no barge-in phase and during which +// the API starts speech detection and may inform the client that an utterance +// has been detected. Note that no-speech event is not expected in this +// phase. +// +// The client provides this configuration in terms of the durations of those +// two phases. The durations are measured in terms of the audio length from the +// the start of the input audio. +// +// No-speech event is a response with END_OF_UTTERANCE without any transcript +// following up. +message BargeInConfig { + // Duration that is not eligible for barge-in at the beginning of the input + // audio. + google.protobuf.Duration no_barge_in_duration = 1; + + // Total duration for the playback at the beginning of the input audio. + google.protobuf.Duration total_duration = 2; +} + // Instructs the speech recognizer on how to process the audio content. message InputAudioConfig { // Required. Audio encoding of the audio content to process. @@ -181,8 +214,8 @@ message InputAudioConfig { // Optional. Which Speech model to select for the given request. Select the // model best suited to your domain to get best results. If a model is not - // explicitly specified, then we auto-select a model based on the parameters - // in the InputAudioConfig. + // explicitly specified, then Dialogflow auto-selects a model based on other + // parameters in the InputAudioConfig and Agent settings. // If enhanced speech model is enabled for the agent and an enhanced // version of the specified model for the language does not exist, then the // speech is recognized using the standard version of the specified model. @@ -195,7 +228,12 @@ message InputAudioConfig { // // - phone_call (best for Agent Assist and telephony) // - latest_short (best for Dialogflow non-telephony) - // - command_and_search (best for very short utterances and commands) + // - command_and_search + // + // Leave this field unspecified to use + // [Agent Speech + // settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) + // for model selection. string model = 7; // Optional. Which variant of the [Speech @@ -211,6 +249,9 @@ message InputAudioConfig { // needed. // Note: This setting is relevant only for streaming methods. bool single_utterance = 8; + + // Configuration of barge-in behavior during the streaming of input audio. + BargeInConfig barge_in_config = 15; } // Gender of the voice as described in diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index 41d853e7d2e..88b8bf365ec 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -40,15 +40,6 @@ service EntityTypes { "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/dialogflow"; - // Returns the list of all entity types in the specified agent. - rpc ListEntityTypes(ListEntityTypesRequest) - returns (ListEntityTypesResponse) { - option (google.api.http) = { - get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" - }; - option (google.api.method_signature) = "parent"; - } - // Retrieves the specified entity type. rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { option (google.api.http) = { @@ -91,6 +82,15 @@ service EntityTypes { }; option (google.api.method_signature) = "name"; } + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) + returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + } } // Entities are extracted from user input and represent parameters that are diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/generator.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/generator.proto new file mode 100644 index 00000000000..0ff56e174b7 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/generator.proto @@ -0,0 +1,241 @@ +// Copyright 2023 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.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "GeneratorProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing +// [Generators][google.cloud.dialogflow.cx.v3beta1.Generator] +service Generators { + 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"; + + // Returns the list of all generators in the specified agent. + rpc ListGenerators(ListGeneratorsRequest) returns (ListGeneratorsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified generator. + rpc GetGenerator(GetGeneratorRequest) returns (Generator) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/generators/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a generator in the specified agent. + rpc CreateGenerator(CreateGeneratorRequest) returns (Generator) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators" + body: "generator" + }; + option (google.api.method_signature) = "parent,generator"; + } + + // Update the specified generator. + rpc UpdateGenerator(UpdateGeneratorRequest) returns (Generator) { + option (google.api.http) = { + patch: "/v3beta1/{generator.name=projects/*/locations/*/agents/*/generators/*}" + body: "generator" + }; + option (google.api.method_signature) = "generator,update_mask"; + } + + // Deletes the specified generators. + rpc DeleteGenerator(DeleteGeneratorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/generators/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Generators contain prompt to be sent to the LLM model to generate text. The +// prompt can contain parameters which will be resolved before calling the +// model. It can optionally contain banned phrases to ensure the model responses +// are safe. +message Generator { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Generator" + pattern: "projects/{project}/locations/{location}/agents/{agent}/generators/{generator}" + }; + + // Represents a custom placeholder in the prompt text. + message Placeholder { + // Unique ID used to map custom placeholder to parameters in fulfillment. + string id = 1; + + // Custom placeholder value in the prompt text. + string name = 2; + } + + // The unique identifier of the generator. + // Must be set for the + // [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator] + // method. [Generators.CreateGenerate][] populates the name automatically. + // Format: `projects//locations//agents//generators/`. + string name = 1; + + // Required. The human-readable name of the generator, unique within the + // agent. The prompt contains pre-defined parameters such as $conversation, + // $last-user-utterance, etc. populated by Dialogflow. It can also contain + // custom placeholders which will be resolved during fulfillment. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Prompt for the LLM model. + Phrase prompt_text = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of custom placeholders in the prompt text. + repeated Placeholder placeholders = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Text input which can be used for prompt or banned phrases. +message Phrase { + // Required. Text input which can be used for prompt or banned phrases. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators]. +message ListGeneratorsRequest { + // Required. The agent to list all generators for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Generator" + } + ]; + + // The language to list generators for. + string language_code = 2; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for +// [Generators.ListGenerators][google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators]. +message ListGeneratorsResponse { + // The list of generators. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Generator generators = 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 +// [Generators.GetGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator]. +message GetGeneratorRequest { + // Required. The name of the generator. + // Format: `projects//locations//agents//generators/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Generator" + } + ]; + + // The language to list generators for. + string language_code = 2; +} + +// The request message for +// [Generators.CreateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator]. +message CreateGeneratorRequest { + // Required. The agent to create a generator for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Generator" + } + ]; + + // Required. The generator to create. + Generator generator = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language to create generators for the following fields: + // * `Generator.prompt_text.text` + // If not specified, the agent's default language is used. + string language_code = 3; +} + +// The request message for +// [Generators.UpdateGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator]. +message UpdateGeneratorRequest { + // Required. The generator to update. + Generator generator = 1 [(google.api.field_behavior) = REQUIRED]; + + // The language to list generators for. + string language_code = 2; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// The request message for +// [Generators.DeleteGenerator][google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator]. +message DeleteGeneratorRequest { + // Required. The name of the generator to delete. + // Format: `projects//locations//agents//generators/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Generator" + } + ]; + + // This field has no effect for generators not being used. + // For generators that are used by pages/flows/transition route groups: + // + // * 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 generator, as well + // as any references to the generator (i.e. + // [Generator][Fulfillment.generator]) in fulfillments. + bool force = 2; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index d0895cf89e4..04defe37f54 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -27,6 +27,7 @@ import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; import "google/type/latlng.proto"; @@ -44,6 +45,11 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}" pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/DataStore" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" +}; // A session represents an interaction with a user. You retrieve user input // and pass it to the @@ -114,6 +120,78 @@ service Sessions { } }; } + + // Updates the feedback received from the user for a single turn of the bot + // response. + rpc SubmitAnswerFeedback(SubmitAnswerFeedbackRequest) + returns (AnswerFeedback) { + option (google.api.http) = { + post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback" + body: "*" + }; + } +} + +// Stores information about feedback provided by users about a response. +message AnswerFeedback { + // Represents thumbs up/down rating provided by user about a response. + enum Rating { + // Rating not specified. + RATING_UNSPECIFIED = 0; + + // Thumbs up feedback from user. + THUMBS_UP = 1; + + // Thumbs down feedback from user. + THUMBS_DOWN = 2; + } + + // Stores extra information about why users provided thumbs down rating. + message RatingReason { + // Optional. Custom reason labels for thumbs down rating provided by the + // user. The maximum number of labels allowed is 10 and the maximum length + // of a single label is 128 characters. + repeated string reason_labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional feedback about the rating. + // This field can be populated without choosing a predefined `reason`. + string feedback = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Rating from user for the specific Dialogflow response. + Rating rating = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. In case of thumbs down rating provided, users can optionally + // provide context about the rating. + RatingReason rating_reason = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom rating from the user about the provided answer, with + // maximum length of 1024 characters. For example, client could use a + // customized JSON object to indicate the rating. + string custom_rating = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to set the feedback for a bot answer. +message SubmitAnswerFeedbackRequest { + // Required. The name of the session the feedback was sent to. + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // Required. ID of the response to update its feedback. This is the same as + // DetectIntentResponse.response_id. + string response_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feedback provided for a bot answer. + AnswerFeedback answer_feedback = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields to update. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = OPTIONAL]; } // The request to detect user's intent. @@ -609,6 +687,120 @@ message QueryParameters { // This value should be no longer than 1 day. google.protobuf.Duration session_ttl = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information about the end-user to improve the relevance and + // accuracy of generative answers. + // + // This will be interpreted and used by a language model, so, for good + // results, the data should be self-descriptive, and in a simple structure. + // + // Example: + // + // ```json + // { + // "subscription plan": "Business Premium Plus", + // "devices owned": [ + // {"model": "Google Pixel 7"}, + // {"model": "Google Pixel Tablet"} + // ] + // } + // ``` + google.protobuf.Struct end_user_metadata = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Search configuration for UCS search queries. + SearchConfig search_config = 20 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search configuration for UCS search queries. +message SearchConfig { + // Optional. Boosting configuration for the datastores. + repeated BoostSpecs boost_specs = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter configuration for the datastores. + repeated FilterSpecs filter_specs = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specification to boost certain documents. +// A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation +// is available at +// https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec +message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // Optional. An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Condition boost specifications. If a document matches multiple + // conditions in the specifictions, boost scores from these specifications are + // all applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Boost specifications for data stores. +message BoostSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. A list of boosting specifications. + repeated BoostSpec spec = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Filter specifications for data stores. +message FilterSpecs { + // Optional. Data Stores where the boosting configuration is applied. The full + // names of the referenced data stores. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store} + repeated string data_stores = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Optional. The filter expression to be applied. + // Expression syntax is documented at + // https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; } // Represents the query input. It can contain one of: @@ -774,6 +966,10 @@ message QueryResult { // Dialogflow exports audio to Google Cloud Storage, then the client may need // to wait for the resulting object to appear in the bucket before proceeding. AdvancedSettings advanced_settings = 21; + + // Indicates whether the Thumbs up/Thumbs down rating controls are need to be + // shown for the response in the Dialogflow Messenger widget. + bool allow_answer_feedback = 32; } // Represents the natural language text to be processed. diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index 660cdfefdb7..147c418d3be 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -855,6 +855,9 @@ export namespace google { /** Agent genAppBuilderSettings */ genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3.Agent.IGenAppBuilderSettings|null); + + /** Agent answerFeedbackSettings */ + answerFeedbackSettings?: (google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings|null); } /** Represents an Agent. */ @@ -917,6 +920,9 @@ export namespace google { /** Agent genAppBuilderSettings. */ public genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3.Agent.IGenAppBuilderSettings|null); + /** Agent answerFeedbackSettings. */ + public answerFeedbackSettings?: (google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings|null); + /** Agent _genAppBuilderSettings. */ public _genAppBuilderSettings?: "genAppBuilderSettings"; @@ -1320,6 +1326,103 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AnswerFeedbackSettings. */ + interface IAnswerFeedbackSettings { + + /** AnswerFeedbackSettings enableAnswerFeedback */ + enableAnswerFeedback?: (boolean|null); + } + + /** Represents an AnswerFeedbackSettings. */ + class AnswerFeedbackSettings implements IAnswerFeedbackSettings { + + /** + * Constructs a new AnswerFeedbackSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings); + + /** AnswerFeedbackSettings enableAnswerFeedback. */ + public enableAnswerFeedback: boolean; + + /** + * Creates a new AnswerFeedbackSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerFeedbackSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings): google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings; + + /** + * Encodes the specified AnswerFeedbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @param message AnswerFeedbackSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerFeedbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @param message AnswerFeedbackSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerFeedbackSettings + * @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.Agent.AnswerFeedbackSettings; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerFeedbackSettings + * @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.Agent.AnswerFeedbackSettings; + + /** + * Verifies an AnswerFeedbackSettings 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 AnswerFeedbackSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerFeedbackSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings; + + /** + * Creates a plain object from an AnswerFeedbackSettings message. Also converts values to other types if specified. + * @param message AnswerFeedbackSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerFeedbackSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerFeedbackSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a ListAgentsRequest. */ @@ -3167,6 +3270,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BargeInConfig. */ + interface IBargeInConfig { + + /** BargeInConfig noBargeInDuration */ + noBargeInDuration?: (google.protobuf.IDuration|null); + + /** BargeInConfig totalDuration */ + totalDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a BargeInConfig. */ + class BargeInConfig implements IBargeInConfig { + + /** + * Constructs a new BargeInConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IBargeInConfig); + + /** BargeInConfig noBargeInDuration. */ + public noBargeInDuration?: (google.protobuf.IDuration|null); + + /** BargeInConfig totalDuration. */ + public totalDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new BargeInConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BargeInConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IBargeInConfig): google.cloud.dialogflow.cx.v3.BargeInConfig; + + /** + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BargeInConfig + * @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.BargeInConfig; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BargeInConfig + * @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.BargeInConfig; + + /** + * Verifies a BargeInConfig 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 BargeInConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BargeInConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.BargeInConfig; + + /** + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. + * @param message BargeInConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.BargeInConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BargeInConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BargeInConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an InputAudioConfig. */ interface IInputAudioConfig { @@ -3190,6 +3396,9 @@ export namespace google { /** InputAudioConfig singleUtterance */ singleUtterance?: (boolean|null); + + /** InputAudioConfig bargeInConfig */ + bargeInConfig?: (google.cloud.dialogflow.cx.v3.IBargeInConfig|null); } /** Represents an InputAudioConfig. */ @@ -3222,6 +3431,9 @@ export namespace google { /** InputAudioConfig singleUtterance. */ public singleUtterance: boolean; + /** InputAudioConfig bargeInConfig. */ + public bargeInConfig?: (google.cloud.dialogflow.cx.v3.IBargeInConfig|null); + /** * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set @@ -11423,20 +11635,6 @@ export namespace google { */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse - */ - 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 GetEntityType. * @param request GetEntityTypeRequest message or plain object @@ -11492,16 +11690,23 @@ export namespace google { * @returns Promise */ public deleteEntityType(request: google.cloud.dialogflow.cx.v3.IDeleteEntityTypeRequest): Promise; - } - namespace EntityTypes { + /** + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse + */ + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypesCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|listEntityTypes}. - * @param error Error, if any - * @param [response] ListEntityTypesResponse + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListEntityTypesResponse) => void; + public listEntityTypes(request: google.cloud.dialogflow.cx.v3.IListEntityTypesRequest): Promise; + } + + namespace EntityTypes { /** * Callback as used by {@link google.cloud.dialogflow.cx.v3.EntityTypes|getEntityType}. @@ -11530,6 +11735,13 @@ export namespace google { * @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; } /** Properties of an EntityType. */ @@ -21874,6 +22086,20 @@ export namespace google { * @returns Promise */ public fulfillIntent(request: google.cloud.dialogflow.cx.v3.IFulfillIntentRequest): Promise; + + /** + * Calls SubmitAnswerFeedback. + * @param request SubmitAnswerFeedbackRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnswerFeedback + */ + public submitAnswerFeedback(request: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, callback: google.cloud.dialogflow.cx.v3.Sessions.SubmitAnswerFeedbackCallback): void; + + /** + * Calls SubmitAnswerFeedback. + * @param request SubmitAnswerFeedbackRequest message or plain object + * @returns Promise + */ + public submitAnswerFeedback(request: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest): Promise; } namespace Sessions { @@ -21905,6 +22131,350 @@ export namespace google { * @param [response] FulfillIntentResponse */ type FulfillIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.FulfillIntentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Sessions|submitAnswerFeedback}. + * @param error Error, if any + * @param [response] AnswerFeedback + */ + type SubmitAnswerFeedbackCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.AnswerFeedback) => void; + } + + /** Properties of an AnswerFeedback. */ + interface IAnswerFeedback { + + /** AnswerFeedback rating */ + rating?: (google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating|keyof typeof google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating|null); + + /** AnswerFeedback ratingReason */ + ratingReason?: (google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null); + + /** AnswerFeedback customRating */ + customRating?: (string|null); + } + + /** Represents an AnswerFeedback. */ + class AnswerFeedback implements IAnswerFeedback { + + /** + * Constructs a new AnswerFeedback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IAnswerFeedback); + + /** AnswerFeedback rating. */ + public rating: (google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating|keyof typeof google.cloud.dialogflow.cx.v3.AnswerFeedback.Rating); + + /** AnswerFeedback ratingReason. */ + public ratingReason?: (google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason|null); + + /** AnswerFeedback customRating. */ + public customRating: string; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerFeedback instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IAnswerFeedback): google.cloud.dialogflow.cx.v3.AnswerFeedback; + + /** + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerFeedback + * @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.AnswerFeedback; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerFeedback + * @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.AnswerFeedback; + + /** + * Verifies an AnswerFeedback 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 AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerFeedback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.AnswerFeedback; + + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @param message AnswerFeedback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerFeedback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerFeedback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnswerFeedback { + + /** Rating enum. */ + enum Rating { + RATING_UNSPECIFIED = 0, + THUMBS_UP = 1, + THUMBS_DOWN = 2 + } + + /** Properties of a RatingReason. */ + interface IRatingReason { + + /** RatingReason reasonLabels */ + reasonLabels?: (string[]|null); + + /** RatingReason feedback */ + feedback?: (string|null); + } + + /** Represents a RatingReason. */ + class RatingReason implements IRatingReason { + + /** + * Constructs a new RatingReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason); + + /** RatingReason reasonLabels. */ + public reasonLabels: string[]; + + /** RatingReason feedback. */ + public feedback: string; + + /** + * Creates a new RatingReason instance using the specified properties. + * @param [properties] Properties to set + * @returns RatingReason instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason): google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason; + + /** + * Encodes the specified RatingReason message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. + * @param message RatingReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RatingReason message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.verify|verify} messages. + * @param message RatingReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.AnswerFeedback.IRatingReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RatingReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RatingReason + * @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.AnswerFeedback.RatingReason; + + /** + * Decodes a RatingReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RatingReason + * @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.AnswerFeedback.RatingReason; + + /** + * Verifies a RatingReason 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 RatingReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RatingReason + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason; + + /** + * Creates a plain object from a RatingReason message. Also converts values to other types if specified. + * @param message RatingReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RatingReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RatingReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SubmitAnswerFeedbackRequest. */ + interface ISubmitAnswerFeedbackRequest { + + /** SubmitAnswerFeedbackRequest session */ + session?: (string|null); + + /** SubmitAnswerFeedbackRequest responseId */ + responseId?: (string|null); + + /** SubmitAnswerFeedbackRequest answerFeedback */ + answerFeedback?: (google.cloud.dialogflow.cx.v3.IAnswerFeedback|null); + + /** SubmitAnswerFeedbackRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SubmitAnswerFeedbackRequest. */ + class SubmitAnswerFeedbackRequest implements ISubmitAnswerFeedbackRequest { + + /** + * Constructs a new SubmitAnswerFeedbackRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest); + + /** SubmitAnswerFeedbackRequest session. */ + public session: string; + + /** SubmitAnswerFeedbackRequest responseId. */ + public responseId: string; + + /** SubmitAnswerFeedbackRequest answerFeedback. */ + public answerFeedback?: (google.cloud.dialogflow.cx.v3.IAnswerFeedback|null); + + /** SubmitAnswerFeedbackRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SubmitAnswerFeedbackRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitAnswerFeedbackRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest): google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; + + /** + * Encodes the specified SubmitAnswerFeedbackRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @param message SubmitAnswerFeedbackRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitAnswerFeedbackRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @param message SubmitAnswerFeedbackRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitAnswerFeedbackRequest + * @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.SubmitAnswerFeedbackRequest; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitAnswerFeedbackRequest + * @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.SubmitAnswerFeedbackRequest; + + /** + * Verifies a SubmitAnswerFeedbackRequest 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 SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitAnswerFeedbackRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest; + + /** + * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. + * @param message SubmitAnswerFeedbackRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitAnswerFeedbackRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitAnswerFeedbackRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DetectIntentRequest. */ @@ -22784,6 +23354,12 @@ export namespace google { /** QueryParameters sessionTtl */ sessionTtl?: (google.protobuf.IDuration|null); + + /** QueryParameters endUserMetadata */ + endUserMetadata?: (google.protobuf.IStruct|null); + + /** QueryParameters searchConfig */ + searchConfig?: (google.cloud.dialogflow.cx.v3.ISearchConfig|null); } /** Represents a QueryParameters. */ @@ -22831,6 +23407,12 @@ export namespace google { /** QueryParameters sessionTtl. */ public sessionTtl?: (google.protobuf.IDuration|null); + /** QueryParameters endUserMetadata. */ + public endUserMetadata?: (google.protobuf.IStruct|null); + + /** QueryParameters searchConfig. */ + public searchConfig?: (google.cloud.dialogflow.cx.v3.ISearchConfig|null); + /** * Creates a new QueryParameters instance using the specified properties. * @param [properties] Properties to set @@ -22909,6 +23491,518 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SearchConfig. */ + interface ISearchConfig { + + /** SearchConfig boostSpecs */ + boostSpecs?: (google.cloud.dialogflow.cx.v3.IBoostSpecs[]|null); + + /** SearchConfig filterSpecs */ + filterSpecs?: (google.cloud.dialogflow.cx.v3.IFilterSpecs[]|null); + } + + /** Represents a SearchConfig. */ + class SearchConfig implements ISearchConfig { + + /** + * Constructs a new SearchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ISearchConfig); + + /** SearchConfig boostSpecs. */ + public boostSpecs: google.cloud.dialogflow.cx.v3.IBoostSpecs[]; + + /** SearchConfig filterSpecs. */ + public filterSpecs: google.cloud.dialogflow.cx.v3.IFilterSpecs[]; + + /** + * Creates a new SearchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ISearchConfig): google.cloud.dialogflow.cx.v3.SearchConfig; + + /** + * Encodes the specified SearchConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. + * @param message SearchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ISearchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SearchConfig.verify|verify} messages. + * @param message SearchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISearchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchConfig + * @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.SearchConfig; + + /** + * Decodes a SearchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchConfig + * @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.SearchConfig; + + /** + * Verifies a SearchConfig 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 SearchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SearchConfig; + + /** + * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. + * @param message SearchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.SearchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoostSpec. */ + interface IBoostSpec { + + /** BoostSpec conditionBoostSpecs */ + conditionBoostSpecs?: (google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec[]|null); + } + + /** Represents a BoostSpec. */ + class BoostSpec implements IBoostSpec { + + /** + * Constructs a new BoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IBoostSpec); + + /** BoostSpec conditionBoostSpecs. */ + public conditionBoostSpecs: google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec[]; + + /** + * Creates a new BoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns BoostSpec instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IBoostSpec): google.cloud.dialogflow.cx.v3.BoostSpec; + + /** + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoostSpec + * @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.BoostSpec; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoostSpec + * @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.BoostSpec; + + /** + * Verifies a BoostSpec 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 BoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.BoostSpec; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @param message BoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.BoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BoostSpec { + + /** Properties of a ConditionBoostSpec. */ + interface IConditionBoostSpec { + + /** ConditionBoostSpec condition */ + condition?: (string|null); + + /** ConditionBoostSpec boost */ + boost?: (number|null); + } + + /** Represents a ConditionBoostSpec. */ + class ConditionBoostSpec implements IConditionBoostSpec { + + /** + * Constructs a new ConditionBoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec); + + /** ConditionBoostSpec condition. */ + public condition: string; + + /** ConditionBoostSpec boost. */ + public boost: number; + + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ConditionBoostSpec instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec): google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec; + + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConditionBoostSpec + * @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.BoostSpec.ConditionBoostSpec; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConditionBoostSpec + * @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.BoostSpec.ConditionBoostSpec; + + /** + * Verifies a ConditionBoostSpec 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 ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConditionBoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec; + + /** + * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. + * @param message ConditionBoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConditionBoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConditionBoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BoostSpecs. */ + interface IBoostSpecs { + + /** BoostSpecs dataStores */ + dataStores?: (string[]|null); + + /** BoostSpecs spec */ + spec?: (google.cloud.dialogflow.cx.v3.IBoostSpec[]|null); + } + + /** Represents a BoostSpecs. */ + class BoostSpecs implements IBoostSpecs { + + /** + * Constructs a new BoostSpecs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IBoostSpecs); + + /** BoostSpecs dataStores. */ + public dataStores: string[]; + + /** BoostSpecs spec. */ + public spec: google.cloud.dialogflow.cx.v3.IBoostSpec[]; + + /** + * Creates a new BoostSpecs instance using the specified properties. + * @param [properties] Properties to set + * @returns BoostSpecs instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IBoostSpecs): google.cloud.dialogflow.cx.v3.BoostSpecs; + + /** + * Encodes the specified BoostSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * @param message BoostSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IBoostSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoostSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BoostSpecs.verify|verify} messages. + * @param message BoostSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IBoostSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoostSpecs + * @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.BoostSpecs; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoostSpecs + * @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.BoostSpecs; + + /** + * Verifies a BoostSpecs 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 BoostSpecs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoostSpecs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.BoostSpecs; + + /** + * Creates a plain object from a BoostSpecs message. Also converts values to other types if specified. + * @param message BoostSpecs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.BoostSpecs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoostSpecs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoostSpecs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterSpecs. */ + interface IFilterSpecs { + + /** FilterSpecs dataStores */ + dataStores?: (string[]|null); + + /** FilterSpecs filter */ + filter?: (string|null); + } + + /** Represents a FilterSpecs. */ + class FilterSpecs implements IFilterSpecs { + + /** + * Constructs a new FilterSpecs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IFilterSpecs); + + /** FilterSpecs dataStores. */ + public dataStores: string[]; + + /** FilterSpecs filter. */ + public filter: string; + + /** + * Creates a new FilterSpecs instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterSpecs instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.IFilterSpecs): google.cloud.dialogflow.cx.v3.FilterSpecs; + + /** + * Encodes the specified FilterSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * @param message FilterSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.IFilterSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.FilterSpecs.verify|verify} messages. + * @param message FilterSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IFilterSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterSpecs + * @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.FilterSpecs; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterSpecs + * @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.FilterSpecs; + + /** + * Verifies a FilterSpecs 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 FilterSpecs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterSpecs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.FilterSpecs; + + /** + * Creates a plain object from a FilterSpecs message. Also converts values to other types if specified. + * @param message FilterSpecs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.FilterSpecs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterSpecs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterSpecs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a QueryInput. */ interface IQueryInput { @@ -23092,6 +24186,9 @@ export namespace google { /** QueryResult advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); + + /** QueryResult allowAnswerFeedback */ + allowAnswerFeedback?: (boolean|null); } /** Represents a QueryResult. */ @@ -23154,6 +24251,9 @@ export namespace google { /** QueryResult advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); + /** QueryResult allowAnswerFeedback. */ + public allowAnswerFeedback: boolean; + /** QueryResult query. */ public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmf"); @@ -31023,11 +32123,11 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a SecuritySettingsService */ - class SecuritySettingsService extends $protobuf.rpc.Service { + /** Represents a Generators */ + class Generators extends $protobuf.rpc.Service { /** - * Constructs a new SecuritySettingsService 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 @@ -31035,1150 +32135,1088 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new SecuritySettingsService service using the specified rpc implementation. + * 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): SecuritySettingsService; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Generators; /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings + * Calls ListGenerators. + * @param request ListGeneratorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGeneratorsResponse */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; + public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, callback: google.cloud.dialogflow.cx.v3.Generators.ListGeneratorsCallback): void; /** - * Calls CreateSecuritySettings. - * @param request CreateSecuritySettingsRequest message or plain object + * Calls ListGenerators. + * @param request ListGeneratorsRequest message or plain object * @returns Promise */ - public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; + public listGenerators(request: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest): Promise; /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings + * Calls GetGenerator. + * @param request GetGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; + public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.GetGeneratorCallback): void; /** - * Calls GetSecuritySettings. - * @param request GetSecuritySettingsRequest message or plain object + * Calls GetGenerator. + * @param request GetGeneratorRequest message or plain object * @returns Promise */ - public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; + public getGenerator(request: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest): Promise; /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecuritySettings + * Calls CreateGenerator. + * @param request CreateGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; + public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.CreateGeneratorCallback): void; /** - * Calls UpdateSecuritySettings. - * @param request UpdateSecuritySettingsRequest message or plain object + * Calls CreateGenerator. + * @param request CreateGeneratorRequest message or plain object * @returns Promise */ - public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; + public createGenerator(request: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest): Promise; /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; + public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.UpdateGeneratorCallback): void; /** - * Calls ListSecuritySettings. - * @param request ListSecuritySettingsRequest message or plain object + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object * @returns Promise */ - public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; + public updateGenerator(request: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest): Promise; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest 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; + public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, callback: google.cloud.dialogflow.cx.v3.Generators.DeleteGeneratorCallback): void; /** - * Calls DeleteSecuritySettings. - * @param request DeleteSecuritySettingsRequest message or plain object + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest message or plain object * @returns Promise */ - public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; + public deleteGenerator(request: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest): Promise; } - namespace SecuritySettingsService { + namespace Generators { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|listGenerators}. * @param error Error, if any - * @param [response] SecuritySettings + * @param [response] ListGeneratorsResponse */ - type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + type ListGeneratorsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|getGenerator}. * @param error Error, if any - * @param [response] SecuritySettings + * @param [response] Generator */ - type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + type GetGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|createGenerator}. * @param error Error, if any - * @param [response] SecuritySettings + * @param [response] Generator */ - type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; + type CreateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|updateGenerator}. * @param error Error, if any - * @param [response] ListSecuritySettingsResponse + * @param [response] Generator */ - type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; + type UpdateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Generator) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Generators|deleteGenerator}. * @param error Error, if any * @param [response] Empty */ - type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteGeneratorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a GetSecuritySettingsRequest. */ - interface IGetSecuritySettingsRequest { + /** Properties of a Generator. */ + interface IGenerator { - /** GetSecuritySettingsRequest name */ + /** 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); } - /** Represents a GetSecuritySettingsRequest. */ - class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { + /** Represents a Generator. */ + class Generator implements IGenerator { /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new Generator. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGenerator); - /** GetSecuritySettingsRequest name. */ + /** 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[]; + /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * Creates a new Generator instance using the specified properties. * @param [properties] Properties to set - * @returns GetSecuritySettingsRequest instance + * @returns Generator 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.IGenerator): google.cloud.dialogflow.cx.v3.Generator; /** - * 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 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.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGenerator, 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 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.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * 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 GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Generator; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a Generator message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Generator; /** - * Verifies a GetSecuritySettingsRequest message. + * 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 GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Generator message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSecuritySettingsRequest + * @returns Generator */ - 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.Generator; /** - * 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 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.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Generator, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this Generator to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetSecuritySettingsRequest + * 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; } - /** Properties of an UpdateSecuritySettingsRequest. */ - interface IUpdateSecuritySettingsRequest { + namespace Generator { - /** UpdateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** Properties of a Placeholder. */ + interface IPlaceholder { - /** UpdateSecuritySettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** 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; + } } - /** Represents an UpdateSecuritySettingsRequest. */ - class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { + /** Properties of a Phrase. */ + interface IPhrase { + + /** Phrase text */ + text?: (string|null); + } + + /** Represents a Phrase. */ + class Phrase implements IPhrase { /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new Phrase. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); - - /** UpdateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IPhrase); - /** UpdateSecuritySettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Phrase text. */ + public text: string; /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new Phrase instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecuritySettingsRequest instance + * @returns Phrase 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.IPhrase): google.cloud.dialogflow.cx.v3.Phrase; /** - * 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 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.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IPhrase, 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 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.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. + * 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 UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Phrase; /** - * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a Phrase message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Phrase; /** - * Verifies an UpdateSecuritySettingsRequest message. + * 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 an UpdateSecuritySettingsRequest 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. * @param object Plain object - * @returns UpdateSecuritySettingsRequest + * @returns Phrase */ - 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.Phrase; /** - * 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 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.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this Phrase to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSecuritySettingsRequest + * 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 ListSecuritySettingsRequest. */ - interface IListSecuritySettingsRequest { + /** Properties of a ListGeneratorsRequest. */ + interface IListGeneratorsRequest { - /** ListSecuritySettingsRequest parent */ + /** ListGeneratorsRequest parent */ parent?: (string|null); - /** ListSecuritySettingsRequest pageSize */ + /** ListGeneratorsRequest languageCode */ + languageCode?: (string|null); + + /** ListGeneratorsRequest pageSize */ pageSize?: (number|null); - /** ListSecuritySettingsRequest pageToken */ + /** ListGeneratorsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListSecuritySettingsRequest. */ - class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { + /** Represents a ListGeneratorsRequest. */ + class ListGeneratorsRequest implements IListGeneratorsRequest { /** - * Constructs a new ListSecuritySettingsRequest. + * Constructs a new ListGeneratorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest); - /** ListSecuritySettingsRequest parent. */ + /** ListGeneratorsRequest parent. */ public parent: string; - /** ListSecuritySettingsRequest pageSize. */ + /** ListGeneratorsRequest languageCode. */ + public languageCode: string; + + /** ListGeneratorsRequest pageSize. */ public pageSize: number; - /** ListSecuritySettingsRequest pageToken. */ + /** ListGeneratorsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new ListGeneratorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsRequest instance + * @returns ListGeneratorsRequest 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.IListGeneratorsRequest): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; /** - * 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 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.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, 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 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.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * 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 ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListGeneratorsRequest; /** - * Verifies a ListSecuritySettingsRequest message. + * 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 ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsRequest + * @returns ListGeneratorsRequest */ - 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.ListGeneratorsRequest; /** - * 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 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.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this ListGeneratorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecuritySettingsRequest + * 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 ListSecuritySettingsResponse. */ - interface IListSecuritySettingsResponse { + /** Properties of a ListGeneratorsResponse. */ + interface IListGeneratorsResponse { - /** ListSecuritySettingsResponse securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); + /** ListGeneratorsResponse generators */ + generators?: (google.cloud.dialogflow.cx.v3.IGenerator[]|null); - /** ListSecuritySettingsResponse nextPageToken */ + /** ListGeneratorsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListSecuritySettingsResponse. */ - class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { + /** Represents a ListGeneratorsResponse. */ + class ListGeneratorsResponse implements IListGeneratorsResponse { /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new ListGeneratorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse); - /** ListSecuritySettingsResponse securitySettings. */ - public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; + /** ListGeneratorsResponse generators. */ + public generators: google.cloud.dialogflow.cx.v3.IGenerator[]; - /** ListSecuritySettingsResponse nextPageToken. */ + /** ListGeneratorsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new ListGeneratorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecuritySettingsResponse instance + * @returns ListGeneratorsResponse 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.IListGeneratorsResponse): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; /** - * 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 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.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, 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 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.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * 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 ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListGeneratorsResponse; /** - * Verifies a ListSecuritySettingsResponse message. + * 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 ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecuritySettingsResponse + * @returns ListGeneratorsResponse */ - 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.ListGeneratorsResponse; /** - * 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 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.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListGeneratorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this ListGeneratorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecuritySettingsResponse + * 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 CreateSecuritySettingsRequest. */ - interface ICreateSecuritySettingsRequest { + /** Properties of a GetGeneratorRequest. */ + interface IGetGeneratorRequest { - /** CreateSecuritySettingsRequest parent */ - parent?: (string|null); + /** GetGeneratorRequest name */ + name?: (string|null); - /** CreateSecuritySettingsRequest securitySettings */ - securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** GetGeneratorRequest languageCode */ + languageCode?: (string|null); } - /** Represents a CreateSecuritySettingsRequest. */ - class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { + /** Represents a GetGeneratorRequest. */ + class GetGeneratorRequest implements IGetGeneratorRequest { /** - * Constructs a new CreateSecuritySettingsRequest. + * Constructs a new GetGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest); - /** CreateSecuritySettingsRequest parent. */ - public parent: string; + /** GetGeneratorRequest name. */ + public name: string; - /** CreateSecuritySettingsRequest securitySettings. */ - public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); + /** GetGeneratorRequest languageCode. */ + public languageCode: string; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * Creates a new GetGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSecuritySettingsRequest instance + * @returns GetGeneratorRequest 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.IGetGeneratorRequest): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; /** - * 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 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.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, 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 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.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * 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 CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetGeneratorRequest; /** - * Verifies a CreateSecuritySettingsRequest message. + * 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 CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSecuritySettingsRequest + * @returns GetGeneratorRequest */ - 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.GetGeneratorRequest; /** - * 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 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.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSecuritySettingsRequest to JSON. + * Converts this GetGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateSecuritySettingsRequest + * 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 DeleteSecuritySettingsRequest. */ - interface IDeleteSecuritySettingsRequest { + /** Properties of a CreateGeneratorRequest. */ + interface ICreateGeneratorRequest { - /** DeleteSecuritySettingsRequest name */ - name?: (string|null); + /** CreateGeneratorRequest parent */ + parent?: (string|null); + + /** CreateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** CreateGeneratorRequest languageCode */ + languageCode?: (string|null); } - /** Represents a DeleteSecuritySettingsRequest. */ - class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { + /** Represents a CreateGeneratorRequest. */ + class CreateGeneratorRequest implements ICreateGeneratorRequest { /** - * Constructs a new DeleteSecuritySettingsRequest. + * Constructs a new CreateGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest); - /** DeleteSecuritySettingsRequest name. */ - public name: string; + /** CreateGeneratorRequest parent. */ + public parent: string; + + /** CreateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); + + /** CreateGeneratorRequest languageCode. */ + public languageCode: string; /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * Creates a new CreateGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSecuritySettingsRequest instance + * @returns CreateGeneratorRequest 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.ICreateGeneratorRequest): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; /** - * 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 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.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, 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 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.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * 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 DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateGeneratorRequest; /** - * Verifies a DeleteSecuritySettingsRequest message. + * 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 DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSecuritySettingsRequest + * @returns CreateGeneratorRequest */ - 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.CreateGeneratorRequest; /** - * 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 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.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSecuritySettingsRequest to JSON. + * Converts this CreateGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteSecuritySettingsRequest + * 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 a SecuritySettings. */ - interface ISecuritySettings { + /** Properties of an UpdateGeneratorRequest. */ + interface IUpdateGeneratorRequest { - /** SecuritySettings name */ - name?: (string|null); + /** UpdateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); - /** SecuritySettings displayName */ - displayName?: (string|null); + /** UpdateGeneratorRequest languageCode */ + languageCode?: (string|null); - /** SecuritySettings redactionStrategy */ - redactionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|null); + /** UpdateGeneratorRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** SecuritySettings redactionScope */ - redactionScope?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|null); + /** Represents an UpdateGeneratorRequest. */ + class UpdateGeneratorRequest implements IUpdateGeneratorRequest { - /** SecuritySettings inspectTemplate */ - inspectTemplate?: (string|null); + /** + * Constructs a new UpdateGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest); - /** SecuritySettings deidentifyTemplate */ - deidentifyTemplate?: (string|null); + /** UpdateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3.IGenerator|null); - /** SecuritySettings retentionWindowDays */ - retentionWindowDays?: (number|null); + /** UpdateGeneratorRequest languageCode. */ + public languageCode: string; - /** SecuritySettings retentionStrategy */ - retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); + /** UpdateGeneratorRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** SecuritySettings purgeDataTypes */ - purgeDataTypes?: (google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]|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; - /** SecuritySettings audioExportSettings */ - audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + /** + * 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; - /** SecuritySettings insightsExportSettings */ - insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); - } + /** + * 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; - /** Represents a SecuritySettings. */ - class SecuritySettings implements ISecuritySettings { + /** + * 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; /** - * Constructs a new SecuritySettings. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest; - /** SecuritySettings name. */ - public name: string; + /** + * 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); - /** SecuritySettings displayName. */ - public displayName: string; + /** + * 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; - /** SecuritySettings redactionStrategy. */ - public redactionStrategy: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy); + /** + * 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 }; - /** SecuritySettings redactionScope. */ - public redactionScope: (google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope); + /** + * Converts this UpdateGeneratorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SecuritySettings inspectTemplate. */ - public inspectTemplate: string; + /** + * 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; + } - /** SecuritySettings deidentifyTemplate. */ - public deidentifyTemplate: string; + /** Properties of a DeleteGeneratorRequest. */ + interface IDeleteGeneratorRequest { - /** SecuritySettings retentionWindowDays. */ - public retentionWindowDays?: (number|null); + /** DeleteGeneratorRequest name */ + name?: (string|null); - /** SecuritySettings retentionStrategy. */ - public retentionStrategy?: (google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|keyof typeof google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null); + /** DeleteGeneratorRequest force */ + force?: (boolean|null); + } - /** SecuritySettings purgeDataTypes. */ - public purgeDataTypes: google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[]; + /** Represents a DeleteGeneratorRequest. */ + class DeleteGeneratorRequest implements IDeleteGeneratorRequest { - /** SecuritySettings audioExportSettings. */ - public audioExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null); + /** + * Constructs a new DeleteGeneratorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest); - /** SecuritySettings insightsExportSettings. */ - public insightsExportSettings?: (google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null); + /** DeleteGeneratorRequest name. */ + public name: string; - /** SecuritySettings dataRetention. */ - public dataRetention?: ("retentionWindowDays"|"retentionStrategy"); + /** DeleteGeneratorRequest force. */ + public force: boolean; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new DeleteGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecuritySettings instance + * @returns DeleteGeneratorRequest 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.IDeleteGeneratorRequest): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; /** - * 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 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.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, 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 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.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * 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 SecuritySettings + * @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.SecuritySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecuritySettings + * @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.SecuritySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest; /** - * Verifies a SecuritySettings message. + * 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 SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecuritySettings + * @returns DeleteGeneratorRequest */ - 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.DeleteGeneratorRequest; /** - * 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 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.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecuritySettings to JSON. + * Converts this DeleteGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecuritySettings + * 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; } - 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); - } - - /** 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); - - /** - * 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 { + /** Represents a SecuritySettingsService */ + class SecuritySettingsService extends $protobuf.rpc.Service { /** - * Constructs a new Versions 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 @@ -32186,2623 +33224,2805 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Versions service using the specified rpc implementation. + * 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): Versions; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecuritySettingsService; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVersionsResponse + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback): void; + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettingsCallback): void; /** - * Calls ListVersions. - * @param request ListVersionsRequest message or plain object + * Calls CreateSecuritySettings. + * @param request CreateSecuritySettingsRequest message or plain object * @returns Promise */ - public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest): Promise; + public createSecuritySettings(request: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): Promise; /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback): void; + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettingsCallback): void; /** - * Calls GetVersion. - * @param request GetVersionRequest message or plain object + * Calls GetSecuritySettings. + * @param request GetSecuritySettingsRequest message or plain object * @returns Promise */ - public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest): Promise; + public getSecuritySettings(request: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): Promise; /** - * Calls CreateVersion. - * @param request CreateVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecuritySettings */ - public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback): void; + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettingsCallback): void; /** - * Calls CreateVersion. - * @param request CreateVersionRequest message or plain object + * Calls UpdateSecuritySettings. + * @param request UpdateSecuritySettingsRequest message or plain object * @returns Promise */ - public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): Promise; + public updateSecuritySettings(request: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): Promise; /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Version + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecuritySettingsResponse */ - public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback): void; + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.ListSecuritySettingsCallback): void; /** - * Calls UpdateVersion. - * @param request UpdateVersionRequest message or plain object + * Calls ListSecuritySettings. + * @param request ListSecuritySettingsRequest message or plain object * @returns Promise */ - public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): Promise; + public listSecuritySettings(request: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): Promise; /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object * @param callback Node-style callback called with the error, if any, and Empty */ - public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback): void; - - /** - * Calls DeleteVersion. - * @param request DeleteVersionRequest message or plain object - * @returns Promise - */ - public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): Promise; - - /** - * Calls LoadVersion. - * @param request LoadVersionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback): void; - - /** - * Calls LoadVersion. - * @param request LoadVersionRequest message or plain object - * @returns Promise - */ - public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): Promise; - - /** - * Calls CompareVersions. - * @param request CompareVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CompareVersionsResponse - */ - public compareVersions(request: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CompareVersionsCallback): void; + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, callback: google.cloud.dialogflow.cx.v3.SecuritySettingsService.DeleteSecuritySettingsCallback): void; /** - * Calls CompareVersions. - * @param request CompareVersionsRequest message or plain object + * Calls DeleteSecuritySettings. + * @param request DeleteSecuritySettingsRequest message or plain object * @returns Promise */ - public compareVersions(request: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest): Promise; + public deleteSecuritySettings(request: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): Promise; } - namespace Versions { + namespace SecuritySettingsService { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|listVersions}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. * @param error Error, if any - * @param [response] ListVersionsResponse + * @param [response] SecuritySettings */ - type ListVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListVersionsResponse) => void; + type CreateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|getVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|getSecuritySettings}. * @param error Error, if any - * @param [response] Version + * @param [response] SecuritySettings */ - type GetVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + type GetSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|createVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|updateSecuritySettings}. * @param error Error, if any - * @param [response] Operation + * @param [response] SecuritySettings */ - type CreateVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type UpdateSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.SecuritySettings) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|updateVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|listSecuritySettings}. * @param error Error, if any - * @param [response] Version + * @param [response] ListSecuritySettingsResponse */ - type UpdateVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; + type ListSecuritySettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|deleteVersion}. + * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|deleteSecuritySettings}. * @param error Error, if any * @param [response] Empty */ - type DeleteVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|loadVersion}. - * @param error Error, if any - * @param [response] Operation - */ - type LoadVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|compareVersions}. - * @param error Error, if any - * @param [response] CompareVersionsResponse - */ - type CompareVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.CompareVersionsResponse) => void; + type DeleteSecuritySettingsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a CreateVersionOperationMetadata. */ - interface ICreateVersionOperationMetadata { + /** Properties of a GetSecuritySettingsRequest. */ + interface IGetSecuritySettingsRequest { - /** CreateVersionOperationMetadata version */ - version?: (string|null); + /** GetSecuritySettingsRequest name */ + name?: (string|null); } - /** Represents a CreateVersionOperationMetadata. */ - class CreateVersionOperationMetadata implements ICreateVersionOperationMetadata { + /** Represents a GetSecuritySettingsRequest. */ + class GetSecuritySettingsRequest implements IGetSecuritySettingsRequest { /** - * Constructs a new CreateVersionOperationMetadata. + * Constructs a new GetSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata); + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest); - /** CreateVersionOperationMetadata version. */ - public version: string; + /** GetSecuritySettingsRequest name. */ + public name: string; /** - * Creates a new CreateVersionOperationMetadata instance using the specified properties. + * Creates a new GetSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateVersionOperationMetadata instance + * @returns GetSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. - * @param message CreateVersionOperationMetadata message or plain object to encode + * 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.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. - * @param message CreateVersionOperationMetadata message or plain object to encode + * 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.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. + * 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 CreateVersionOperationMetadata + * @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.CreateVersionOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateVersionOperationMetadata + * @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.CreateVersionOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Verifies a CreateVersionOperationMetadata message. + * 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 CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateVersionOperationMetadata + * @returns GetSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest; /** - * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. - * @param message CreateVersionOperationMetadata + * 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.CreateVersionOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateVersionOperationMetadata to JSON. + * Converts this GetSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateVersionOperationMetadata + * 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 a Version. */ - interface IVersion { - - /** Version name */ - name?: (string|null); - - /** Version displayName */ - displayName?: (string|null); - - /** Version description */ - description?: (string|null); - - /** Version nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + /** Properties of an UpdateSecuritySettingsRequest. */ + interface IUpdateSecuritySettingsRequest { - /** Version createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** UpdateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); - /** Version state */ - state?: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State|null); + /** UpdateSecuritySettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Version. */ - class Version implements IVersion { + /** Represents an UpdateSecuritySettingsRequest. */ + class UpdateSecuritySettingsRequest implements IUpdateSecuritySettingsRequest { /** - * Constructs a new Version. + * Constructs a new UpdateSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IVersion); - - /** Version name. */ - public name: string; - - /** Version displayName. */ - public displayName: string; - - /** Version description. */ - public description: string; - - /** Version nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest); - /** Version createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** UpdateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); - /** Version state. */ - public state: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State); + /** UpdateSecuritySettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Version instance using the specified properties. + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Version instance + * @returns UpdateSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IVersion): google.cloud.dialogflow.cx.v3.Version; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * 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.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. - * @param message Version message or plain object to encode + * 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.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Version message from the specified reader or buffer. + * 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 Version + * @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.Version; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Version + * @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.Version; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Verifies a Version message. + * 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 a Version message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Version + * @returns UpdateSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Version; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest; /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version + * 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.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Version to JSON. + * Converts this UpdateSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Version + * 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; } - namespace Version { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - SUCCEEDED = 2, - FAILED = 3 - } - } - - /** Properties of a ListVersionsRequest. */ - interface IListVersionsRequest { + /** Properties of a ListSecuritySettingsRequest. */ + interface IListSecuritySettingsRequest { - /** ListVersionsRequest parent */ + /** ListSecuritySettingsRequest parent */ parent?: (string|null); - /** ListVersionsRequest pageSize */ + /** ListSecuritySettingsRequest pageSize */ pageSize?: (number|null); - /** ListVersionsRequest pageToken */ + /** ListSecuritySettingsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListVersionsRequest. */ - class ListVersionsRequest implements IListVersionsRequest { + /** Represents a ListSecuritySettingsRequest. */ + class ListSecuritySettingsRequest implements IListSecuritySettingsRequest { /** - * Constructs a new ListVersionsRequest. + * Constructs a new ListSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest); - /** ListVersionsRequest parent. */ + /** ListSecuritySettingsRequest parent. */ public parent: string; - /** ListVersionsRequest pageSize. */ + /** ListSecuritySettingsRequest pageSize. */ public pageSize: number; - /** ListVersionsRequest pageToken. */ + /** ListSecuritySettingsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ListSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsRequest instance + * @returns ListSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * 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.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. - * @param message ListVersionsRequest message or plain object to encode + * 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.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * 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 ListVersionsRequest + * @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.ListVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsRequest + * @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.ListVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Verifies a ListVersionsRequest message. + * 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 ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsRequest + * @returns ListSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest; /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. - * @param message ListVersionsRequest + * 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.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ListSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListVersionsRequest + * 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 ListVersionsResponse. */ - interface IListVersionsResponse { + /** Properties of a ListSecuritySettingsResponse. */ + interface IListSecuritySettingsResponse { - /** ListVersionsResponse versions */ - versions?: (google.cloud.dialogflow.cx.v3.IVersion[]|null); + /** ListSecuritySettingsResponse securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings[]|null); - /** ListVersionsResponse nextPageToken */ + /** ListSecuritySettingsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListVersionsResponse. */ - class ListVersionsResponse implements IListVersionsResponse { + /** Represents a ListSecuritySettingsResponse. */ + class ListSecuritySettingsResponse implements IListSecuritySettingsResponse { /** - * Constructs a new ListVersionsResponse. + * Constructs a new ListSecuritySettingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse); - /** ListVersionsResponse versions. */ - public versions: google.cloud.dialogflow.cx.v3.IVersion[]; + /** ListSecuritySettingsResponse securitySettings. */ + public securitySettings: google.cloud.dialogflow.cx.v3.ISecuritySettings[]; - /** ListVersionsResponse nextPageToken. */ + /** ListSecuritySettingsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new ListSecuritySettingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListVersionsResponse instance + * @returns ListSecuritySettingsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * 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.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. - * @param message ListVersionsResponse message or plain object to encode + * 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.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * 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 ListVersionsResponse + * @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.ListVersionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListVersionsResponse + * @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.ListVersionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Verifies a ListVersionsResponse message. + * 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 ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListVersionsResponse + * @returns ListSecuritySettingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. - * @param message ListVersionsResponse + * 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.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this ListSecuritySettingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListVersionsResponse + * 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 GetVersionRequest. */ - interface IGetVersionRequest { + /** Properties of a CreateSecuritySettingsRequest. */ + interface ICreateSecuritySettingsRequest { - /** GetVersionRequest name */ - name?: (string|null); + /** CreateSecuritySettingsRequest parent */ + parent?: (string|null); + + /** CreateSecuritySettingsRequest securitySettings */ + securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); } - /** Represents a GetVersionRequest. */ - class GetVersionRequest implements IGetVersionRequest { + /** Represents a CreateSecuritySettingsRequest. */ + class CreateSecuritySettingsRequest implements ICreateSecuritySettingsRequest { /** - * Constructs a new GetVersionRequest. + * Constructs a new CreateSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest); - /** GetVersionRequest name. */ - public name: string; + /** CreateSecuritySettingsRequest parent. */ + public parent: string; + + /** CreateSecuritySettingsRequest securitySettings. */ + public securitySettings?: (google.cloud.dialogflow.cx.v3.ISecuritySettings|null); /** - * Creates a new GetVersionRequest instance using the specified properties. + * Creates a new CreateSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetVersionRequest instance + * @returns CreateSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * 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.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. - * @param message GetVersionRequest message or plain object to encode + * 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.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVersionRequest message from the specified reader or buffer. + * 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 GetVersionRequest + * @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.GetVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetVersionRequest + * @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.GetVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Verifies a GetVersionRequest message. + * 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 GetVersionRequest 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. * @param object Plain object - * @returns GetVersionRequest + * @returns CreateSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest; /** - * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. - * @param message GetVersionRequest + * 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.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVersionRequest to JSON. + * Converts this CreateSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetVersionRequest + * 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 CreateVersionRequest. */ - interface ICreateVersionRequest { - - /** CreateVersionRequest parent */ - parent?: (string|null); + /** Properties of a DeleteSecuritySettingsRequest. */ + interface IDeleteSecuritySettingsRequest { - /** CreateVersionRequest version */ - version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** DeleteSecuritySettingsRequest name */ + name?: (string|null); } - /** Represents a CreateVersionRequest. */ - class CreateVersionRequest implements ICreateVersionRequest { + /** Represents a DeleteSecuritySettingsRequest. */ + class DeleteSecuritySettingsRequest implements IDeleteSecuritySettingsRequest { /** - * Constructs a new CreateVersionRequest. + * Constructs a new DeleteSecuritySettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest); - - /** CreateVersionRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest); - /** CreateVersionRequest version. */ - public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** DeleteSecuritySettingsRequest name. */ + public name: string; /** - * Creates a new CreateVersionRequest instance using the specified properties. + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateVersionRequest instance + * @returns DeleteSecuritySettingsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @param message CreateVersionRequest message or plain object to encode + * 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.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. - * @param message CreateVersionRequest message or plain object to encode + * 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.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateVersionRequest message from the specified reader or buffer. + * 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 CreateVersionRequest + * @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.CreateVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateVersionRequest + * @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.CreateVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Verifies a CreateVersionRequest message. + * 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 CreateVersionRequest 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. * @param object Plain object - * @returns CreateVersionRequest + * @returns DeleteSecuritySettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest; /** - * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. - * @param message CreateVersionRequest + * 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.CreateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateVersionRequest to JSON. + * Converts this DeleteSecuritySettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateVersionRequest + * 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 an UpdateVersionRequest. */ - interface IUpdateVersionRequest { + /** Properties of a SecuritySettings. */ + interface ISecuritySettings { - /** UpdateVersionRequest version */ - version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** SecuritySettings name */ + name?: (string|null); - /** UpdateVersionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|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 an UpdateVersionRequest. */ - class UpdateVersionRequest implements IUpdateVersionRequest { + /** Represents a SecuritySettings. */ + class SecuritySettings implements ISecuritySettings { /** - * Constructs a new UpdateVersionRequest. + * Constructs a new SecuritySettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings); - /** UpdateVersionRequest version. */ - public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + /** SecuritySettings name. */ + public name: string; - /** UpdateVersionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** 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 UpdateVersionRequest instance using the specified properties. + * Creates a new SecuritySettings instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateVersionRequest instance + * @returns SecuritySettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ISecuritySettings): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode + * 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.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @param message UpdateVersionRequest message or plain object to encode + * 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.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * 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 UpdateVersionRequest + * @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.UpdateVersionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateVersionRequest + * @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.UpdateVersionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Verifies an UpdateVersionRequest message. + * 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 an UpdateVersionRequest 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. * @param object Plain object - * @returns UpdateVersionRequest + * @returns SecuritySettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.SecuritySettings; /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. - * @param message UpdateVersionRequest + * 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.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateVersionRequest to JSON. + * Converts this SecuritySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateVersionRequest + * 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; } - /** Properties of a DeleteVersionRequest. */ - interface IDeleteVersionRequest { - - /** DeleteVersionRequest name */ - name?: (string|null); - } + namespace SecuritySettings { - /** Represents a DeleteVersionRequest. */ - class DeleteVersionRequest implements IDeleteVersionRequest { + /** RedactionStrategy enum. */ + enum RedactionStrategy { + REDACTION_STRATEGY_UNSPECIFIED = 0, + REDACT_WITH_SERVICE = 1 + } - /** - * Constructs a new DeleteVersionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest); + /** RedactionScope enum. */ + enum RedactionScope { + REDACTION_SCOPE_UNSPECIFIED = 0, + REDACT_DISK_STORAGE = 2 + } - /** DeleteVersionRequest name. */ - public name: string; + /** RetentionStrategy enum. */ + enum RetentionStrategy { + RETENTION_STRATEGY_UNSPECIFIED = 0, + REMOVE_AFTER_CONVERSATION = 1 + } - /** - * Creates a new DeleteVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVersionRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + /** 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); + } + + /** 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); + + /** + * 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 { /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Constructs a new Versions service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. - * @param message DeleteVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Creates new Versions 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 encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Versions; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVersionsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback): void; /** - * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public listVersions(request: google.cloud.dialogflow.cx.v3.IListVersionsRequest): Promise; /** - * Verifies a DeleteVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version */ - public static verify(message: { [k: string]: any }): (string|null); + public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback): void; /** - * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVersionRequest + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; + public getVersion(request: google.cloud.dialogflow.cx.v3.IGetVersionRequest): Promise; /** - * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. - * @param message DeleteVersionRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback): void; /** - * Converts this DeleteVersionRequest to JSON. - * @returns JSON object + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public createVersion(request: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): Promise; /** - * Gets the default type url for DeleteVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Version */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadVersionRequest. */ - interface ILoadVersionRequest { - - /** LoadVersionRequest name */ - name?: (string|null); - - /** LoadVersionRequest allowOverrideAgentResources */ - allowOverrideAgentResources?: (boolean|null); - } + public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback): void; - /** Represents a LoadVersionRequest. */ - class LoadVersionRequest implements ILoadVersionRequest { + /** + * Calls UpdateVersion. + * @param request UpdateVersionRequest message or plain object + * @returns Promise + */ + public updateVersion(request: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): Promise; /** - * Constructs a new LoadVersionRequest. - * @param [properties] Properties to set + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest); + public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback): void; - /** LoadVersionRequest name. */ - public name: string; + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise + */ + public deleteVersion(request: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): Promise; - /** LoadVersionRequest allowOverrideAgentResources. */ - public allowOverrideAgentResources: boolean; + /** + * Calls LoadVersion. + * @param request LoadVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, callback: google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback): void; /** - * Creates a new LoadVersionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadVersionRequest instance + * Calls LoadVersion. + * @param request LoadVersionRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + public loadVersion(request: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): Promise; /** - * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @param message LoadVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CompareVersions. + * @param request CompareVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompareVersionsResponse */ - public static encode(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public compareVersions(request: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, callback: google.cloud.dialogflow.cx.v3.Versions.CompareVersionsCallback): void; /** - * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @param message LoadVersionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CompareVersions. + * @param request CompareVersionsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public compareVersions(request: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest): Promise; + } + + namespace Versions { /** - * Decodes a LoadVersionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadVersionRequest - * @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.Versions|listVersions}. + * @param error Error, if any + * @param [response] ListVersionsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + type ListVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.ListVersionsResponse) => void; /** - * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadVersionRequest - * @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.Versions|getVersion}. + * @param error Error, if any + * @param [response] Version */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + type GetVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; /** - * Verifies a LoadVersionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|createVersion}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type CreateVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadVersionRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|updateVersion}. + * @param error Error, if any + * @param [response] Version */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.LoadVersionRequest; + type UpdateVersionCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.Version) => void; /** - * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. - * @param message LoadVersionRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|deleteVersion}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.cloud.dialogflow.cx.v3.LoadVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeleteVersionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this LoadVersionRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|loadVersion}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type LoadVersionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for LoadVersionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|compareVersions}. + * @param error Error, if any + * @param [response] CompareVersionsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type CompareVersionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3.CompareVersionsResponse) => void; } - /** Properties of a CompareVersionsRequest. */ - interface ICompareVersionsRequest { - - /** CompareVersionsRequest baseVersion */ - baseVersion?: (string|null); - - /** CompareVersionsRequest targetVersion */ - targetVersion?: (string|null); + /** Properties of a CreateVersionOperationMetadata. */ + interface ICreateVersionOperationMetadata { - /** CompareVersionsRequest languageCode */ - languageCode?: (string|null); + /** CreateVersionOperationMetadata version */ + version?: (string|null); } - /** Represents a CompareVersionsRequest. */ - class CompareVersionsRequest implements ICompareVersionsRequest { + /** Represents a CreateVersionOperationMetadata. */ + class CreateVersionOperationMetadata implements ICreateVersionOperationMetadata { /** - * Constructs a new CompareVersionsRequest. + * Constructs a new CreateVersionOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest); - - /** CompareVersionsRequest baseVersion. */ - public baseVersion: string; - - /** CompareVersionsRequest targetVersion. */ - public targetVersion: string; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata); - /** CompareVersionsRequest languageCode. */ - public languageCode: string; + /** CreateVersionOperationMetadata version. */ + public version: string; /** - * Creates a new CompareVersionsRequest instance using the specified properties. + * Creates a new CreateVersionOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CompareVersionsRequest instance + * @returns CreateVersionOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Encodes the specified CompareVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. - * @param message CompareVersionsRequest message or plain object to encode + * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @param message CreateVersionOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompareVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. - * @param message CompareVersionsRequest message or plain object to encode + * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * @param message CreateVersionOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompareVersionsRequest message from the specified reader or buffer. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompareVersionsRequest + * @returns CreateVersionOperationMetadata * @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.CompareVersionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Decodes a CompareVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompareVersionsRequest + * @returns CreateVersionOperationMetadata * @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.CompareVersionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Verifies a CompareVersionsRequest message. + * Verifies a CreateVersionOperationMetadata 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 CompareVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompareVersionsRequest + * @returns CreateVersionOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata; /** - * Creates a plain object from a CompareVersionsRequest message. Also converts values to other types if specified. - * @param message CompareVersionsRequest + * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. + * @param message CreateVersionOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CompareVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompareVersionsRequest to JSON. + * Converts this CreateVersionOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompareVersionsRequest + * Gets the default type url for CreateVersionOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CompareVersionsResponse. */ - interface ICompareVersionsResponse { + /** Properties of a Version. */ + interface IVersion { - /** CompareVersionsResponse baseVersionContentJson */ - baseVersionContentJson?: (string|null); + /** Version name */ + name?: (string|null); - /** CompareVersionsResponse targetVersionContentJson */ - targetVersionContentJson?: (string|null); + /** Version displayName */ + displayName?: (string|null); - /** CompareVersionsResponse compareTime */ - compareTime?: (google.protobuf.ITimestamp|null); + /** Version description */ + description?: (string|null); + + /** Version nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + + /** Version createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Version state */ + state?: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State|null); } - /** Represents a CompareVersionsResponse. */ - class CompareVersionsResponse implements ICompareVersionsResponse { + /** Represents a Version. */ + class Version implements IVersion { /** - * Constructs a new CompareVersionsResponse. + * Constructs a new Version. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3.IVersion); - /** CompareVersionsResponse baseVersionContentJson. */ - public baseVersionContentJson: string; + /** Version name. */ + public name: string; - /** CompareVersionsResponse targetVersionContentJson. */ - public targetVersionContentJson: string; + /** Version displayName. */ + public displayName: string; - /** CompareVersionsResponse compareTime. */ - public compareTime?: (google.protobuf.ITimestamp|null); + /** Version description. */ + public description: string; + + /** Version nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); + + /** Version createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Version state. */ + public state: (google.cloud.dialogflow.cx.v3.Version.State|keyof typeof google.cloud.dialogflow.cx.v3.Version.State); /** - * Creates a new CompareVersionsResponse instance using the specified properties. + * Creates a new Version instance using the specified properties. * @param [properties] Properties to set - * @returns CompareVersionsResponse instance + * @returns Version instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse): google.cloud.dialogflow.cx.v3.CompareVersionsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3.IVersion): google.cloud.dialogflow.cx.v3.Version; /** - * Encodes the specified CompareVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. - * @param message CompareVersionsResponse message or plain object to encode + * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompareVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. - * @param message CompareVersionsResponse message or plain object to encode + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * @param message Version message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompareVersionsResponse message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompareVersionsResponse + * @returns Version * @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.CompareVersionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.Version; /** - * Decodes a CompareVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompareVersionsResponse + * @returns Version * @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.CompareVersionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.Version; /** - * Verifies a CompareVersionsResponse message. + * Verifies a Version 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 CompareVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompareVersionsResponse + * @returns Version */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CompareVersionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Version; /** - * Creates a plain object from a CompareVersionsResponse message. Also converts values to other types if specified. - * @param message CompareVersionsResponse + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3.CompareVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompareVersionsResponse to JSON. + * Converts this Version to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompareVersionsResponse + * Gets the default type url for Version * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Namespace v3beta1. */ - namespace v3beta1 { + namespace Version { - /** Properties of an AdvancedSettings. */ - interface IAdvancedSettings { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + FAILED = 3 + } + } - /** AdvancedSettings audioExportGcsDestination */ - audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { - /** AdvancedSettings dtmfSettings */ - dtmfSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null); + /** ListVersionsRequest parent */ + parent?: (string|null); - /** AdvancedSettings loggingSettings */ - loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); + /** ListVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListVersionsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an AdvancedSettings. */ - class AdvancedSettings implements IAdvancedSettings { + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { /** - * Constructs a new AdvancedSettings. + * Constructs a new ListVersionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest); - /** AdvancedSettings audioExportGcsDestination. */ - public audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + /** ListVersionsRequest parent. */ + public parent: string; - /** AdvancedSettings dtmfSettings. */ - public dtmfSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null); + /** ListVersionsRequest pageSize. */ + public pageSize: number; - /** AdvancedSettings loggingSettings. */ - public loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); + /** ListVersionsRequest pageToken. */ + public pageToken: string; /** - * Creates a new AdvancedSettings instance using the specified properties. + * Creates a new ListVersionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AdvancedSettings instance + * @returns ListVersionsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsRequest): google.cloud.dialogflow.cx.v3.ListVersionsRequest; /** - * Encodes the specified AdvancedSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. - * @param message AdvancedSettings message or plain object to encode + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdvancedSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. - * @param message AdvancedSettings message or plain object to encode + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdvancedSettings message from the specified reader or buffer. + * Decodes a ListVersionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdvancedSettings + * @returns ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsRequest; /** - * Decodes an AdvancedSettings message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdvancedSettings + * @returns ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsRequest; /** - * Verifies an AdvancedSettings message. + * Verifies a ListVersionsRequest 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 AdvancedSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdvancedSettings + * @returns ListVersionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsRequest; /** - * Creates a plain object from an AdvancedSettings message. Also converts values to other types if specified. - * @param message AdvancedSettings + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdvancedSettings to JSON. + * Converts this ListVersionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdvancedSettings + * Gets the default type url for ListVersionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AdvancedSettings { - - /** Properties of a DtmfSettings. */ - interface IDtmfSettings { - - /** DtmfSettings enabled */ - enabled?: (boolean|null); - - /** DtmfSettings maxDigits */ - maxDigits?: (number|null); - - /** DtmfSettings finishDigit */ - finishDigit?: (string|null); - } - - /** Represents a DtmfSettings. */ - class DtmfSettings implements IDtmfSettings { - - /** - * Constructs a new DtmfSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings); - - /** DtmfSettings enabled. */ - public enabled: boolean; - - /** DtmfSettings maxDigits. */ - public maxDigits: number; - - /** DtmfSettings finishDigit. */ - public finishDigit: string; - - /** - * Creates a new DtmfSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DtmfSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; - - /** - * Encodes the specified DtmfSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. - * @param message DtmfSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DtmfSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. - * @param message DtmfSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DtmfSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DtmfSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; - - /** - * Decodes a DtmfSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DtmfSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; - - /** - * Verifies a DtmfSettings 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 DtmfSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DtmfSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; - - /** - * Creates a plain object from a DtmfSettings message. Also converts values to other types if specified. - * @param message DtmfSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DtmfSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DtmfSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoggingSettings. */ - interface ILoggingSettings { - - /** LoggingSettings enableStackdriverLogging */ - enableStackdriverLogging?: (boolean|null); - - /** LoggingSettings enableInteractionLogging */ - enableInteractionLogging?: (boolean|null); - } - - /** Represents a LoggingSettings. */ - class LoggingSettings implements ILoggingSettings { - - /** - * Constructs a new LoggingSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings); - - /** LoggingSettings enableStackdriverLogging. */ - public enableStackdriverLogging: boolean; - - /** LoggingSettings enableInteractionLogging. */ - public enableInteractionLogging: boolean; - - /** - * Creates a new LoggingSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns LoggingSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; - - /** - * Encodes the specified LoggingSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. - * @param message LoggingSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoggingSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. - * @param message LoggingSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoggingSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoggingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; - - /** - * Decodes a LoggingSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoggingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; - - /** - * Verifies a LoggingSettings 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 LoggingSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoggingSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; - - /** - * Creates a plain object from a LoggingSettings message. Also converts values to other types if specified. - * @param message LoggingSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoggingSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoggingSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** Properties of a ListVersionsResponse. */ + interface IListVersionsResponse { - /** Properties of a GcsDestination. */ - interface IGcsDestination { + /** ListVersionsResponse versions */ + versions?: (google.cloud.dialogflow.cx.v3.IVersion[]|null); - /** GcsDestination uri */ - uri?: (string|null); + /** ListVersionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** Represents a ListVersionsResponse. */ + class ListVersionsResponse implements IListVersionsResponse { /** - * Constructs a new GcsDestination. + * Constructs a new ListVersionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination); + constructor(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse); - /** GcsDestination uri. */ - public uri: string; + /** ListVersionsResponse versions. */ + public versions: google.cloud.dialogflow.cx.v3.IVersion[]; + + /** ListVersionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new ListVersionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestination instance + * @returns ListVersionsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + public static create(properties?: google.cloud.dialogflow.cx.v3.IListVersionsResponse): google.cloud.dialogflow.cx.v3.ListVersionsResponse; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @param message ListVersionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IListVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a ListVersionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestination + * @returns ListVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.ListVersionsResponse; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestination + * @returns ListVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.ListVersionsResponse; /** - * Verifies a GcsDestination message. + * Verifies a ListVersionsResponse 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 GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestination + * @returns ListVersionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GcsDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.ListVersionsResponse; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @param message ListVersionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.ListVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestination to JSON. + * Converts this ListVersionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcsDestination + * Gets the default type url for ListVersionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an Agents */ - class Agents extends $protobuf.rpc.Service { + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { - /** - * Constructs a new Agents 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); + /** GetVersionRequest name */ + name?: (string|null); + } - /** - * Creates new Agents 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): Agents; + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { /** - * Calls ListAgents. - * @param request ListAgentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAgentsResponse + * Constructs a new GetVersionRequest. + * @param [properties] Properties to set */ - public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback): void; + constructor(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest); + + /** GetVersionRequest name. */ + public name: string; /** - * Calls ListAgents. - * @param request ListAgentsRequest message or plain object - * @returns Promise + * Creates a new GetVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVersionRequest instance */ - public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): Promise; + public static create(properties?: google.cloud.dialogflow.cx.v3.IGetVersionRequest): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Calls GetAgent. - * @param request GetAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetAgent. - * @param request GetAgentRequest message or plain object - * @returns Promise + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateAgent. - * @param request CreateAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Calls CreateAgent. - * @param request CreateAgentRequest message or plain object - * @returns Promise + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Calls UpdateAgent. - * @param request UpdateAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Agent + * Verifies a GetVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateAgent. - * @param request UpdateAgentRequest message or plain object - * @returns Promise + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVersionRequest */ - public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.GetVersionRequest; /** - * Calls DeleteAgent. - * @param request DeleteAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteAgent. - * @param request DeleteAgentRequest message or plain object - * @returns Promise + * Converts this GetVersionRequest to JSON. + * @returns JSON object */ - public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ExportAgent. - * @param request ExportAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for GetVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVersionRequest. */ + interface ICreateVersionRequest { + + /** CreateVersionRequest parent */ + parent?: (string|null); + + /** CreateVersionRequest version */ + version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + } + + /** Represents a CreateVersionRequest. */ + class CreateVersionRequest implements ICreateVersionRequest { /** - * Calls ExportAgent. - * @param request ExportAgentRequest message or plain object - * @returns Promise + * Constructs a new CreateVersionRequest. + * @param [properties] Properties to set */ - public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest); + + /** CreateVersionRequest parent. */ + public parent: string; + + /** CreateVersionRequest version. */ + public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); /** - * Calls RestoreAgent. - * @param request RestoreAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new CreateVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVersionRequest instance */ - public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3.ICreateVersionRequest): google.cloud.dialogflow.cx.v3.CreateVersionRequest; /** - * Calls RestoreAgent. - * @param request RestoreAgentRequest message or plain object - * @returns Promise + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateAgent. - * @param request ValidateAgentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AgentValidationResult + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public validateAgent(request: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgentCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateAgent. - * @param request ValidateAgentRequest message or plain object - * @returns Promise + * Decodes a CreateVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateAgent(request: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CreateVersionRequest; /** - * Calls GetAgentValidationResult. - * @param request GetAgentValidationResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AgentValidationResult + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getAgentValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResultCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CreateVersionRequest; /** - * Calls GetAgentValidationResult. - * @param request GetAgentValidationResultRequest message or plain object - * @returns Promise + * Verifies a CreateVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getAgentValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetGenerativeSettings. - * @param request GetGenerativeSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GenerativeSettings + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVersionRequest */ - public getGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettingsCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CreateVersionRequest; /** - * Calls GetGenerativeSettings. - * @param request GetGenerativeSettingsRequest message or plain object - * @returns Promise + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. + * @param message CreateVersionRequest + * @param [options] Conversion options + * @returns Plain object */ - public getGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3.CreateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateGenerativeSettings. - * @param request UpdateGenerativeSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GenerativeSettings + * Converts this CreateVersionRequest to JSON. + * @returns JSON object */ - public updateGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettingsCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls UpdateGenerativeSettings. - * @param request UpdateGenerativeSettingsRequest message or plain object - * @returns Promise + * Gets the default type url for CreateVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public updateGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Agents { + /** Properties of an UpdateVersionRequest. */ + interface IUpdateVersionRequest { + + /** UpdateVersionRequest version */ + version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + + /** UpdateVersionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateVersionRequest. */ + class UpdateVersionRequest implements IUpdateVersionRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|listAgents}. - * @param error Error, if any - * @param [response] ListAgentsResponse + * Constructs a new UpdateVersionRequest. + * @param [properties] Properties to set */ - type ListAgentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest); + + /** UpdateVersionRequest version. */ + public version?: (google.cloud.dialogflow.cx.v3.IVersion|null); + + /** UpdateVersionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgent}. - * @param error Error, if any - * @param [response] Agent + * Creates a new UpdateVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVersionRequest instance */ - type GetAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|createAgent}. - * @param error Error, if any - * @param [response] Agent + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + public static encode(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateAgent}. - * @param error Error, if any - * @param [response] Agent + * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @param message UpdateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IUpdateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|deleteAgent}. - * @param error Error, if any - * @param [response] Empty + * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteAgentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|exportAgent}. - * @param error Error, if any - * @param [response] Operation + * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ExportAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|restoreAgent}. - * @param error Error, if any - * @param [response] Operation + * Verifies an UpdateVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type RestoreAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|validateAgent}. - * @param error Error, if any - * @param [response] AgentValidationResult + * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVersionRequest */ - type ValidateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.UpdateVersionRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgentValidationResult}. - * @param error Error, if any - * @param [response] AgentValidationResult + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * @param message UpdateVersionRequest + * @param [options] Conversion options + * @returns Plain object */ - type GetAgentValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3.UpdateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getGenerativeSettings}. - * @param error Error, if any - * @param [response] GenerativeSettings + * Converts this UpdateVersionRequest to JSON. + * @returns JSON object */ - type GetGenerativeSettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateGenerativeSettings}. - * @param error Error, if any - * @param [response] GenerativeSettings + * Gets the default type url for UpdateVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type UpdateGenerativeSettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SpeechToTextSettings. */ - interface ISpeechToTextSettings { + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { - /** SpeechToTextSettings enableSpeechAdaptation */ - enableSpeechAdaptation?: (boolean|null); + /** DeleteVersionRequest name */ + name?: (string|null); } - /** Represents a SpeechToTextSettings. */ - class SpeechToTextSettings implements ISpeechToTextSettings { + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { /** - * Constructs a new SpeechToTextSettings. + * Constructs a new DeleteVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest); - /** SpeechToTextSettings enableSpeechAdaptation. */ - public enableSpeechAdaptation: boolean; + /** DeleteVersionRequest name. */ + public name: string; /** - * Creates a new SpeechToTextSettings instance using the specified properties. + * Creates a new DeleteVersionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechToTextSettings instance + * @returns DeleteVersionRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; /** - * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. - * @param message SpeechToTextSettings message or plain object to encode + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. - * @param message SpeechToTextSettings message or plain object to encode + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer. + * Decodes a DeleteVersionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechToTextSettings + * @returns DeleteVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechToTextSettings + * @returns DeleteVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; /** - * Verifies a SpeechToTextSettings message. + * Verifies a DeleteVersionRequest 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 SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechToTextSettings + * @returns DeleteVersionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.DeleteVersionRequest; /** - * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. - * @param message SpeechToTextSettings + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechToTextSettings to JSON. + * Converts this DeleteVersionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SpeechToTextSettings + * Gets the default type url for DeleteVersionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Agent. */ - interface IAgent { + /** Properties of a LoadVersionRequest. */ + interface ILoadVersionRequest { - /** Agent name */ + /** LoadVersionRequest name */ name?: (string|null); - /** Agent displayName */ - displayName?: (string|null); - - /** Agent defaultLanguageCode */ - defaultLanguageCode?: (string|null); - - /** Agent supportedLanguageCodes */ - supportedLanguageCodes?: (string[]|null); - - /** Agent timeZone */ - timeZone?: (string|null); - - /** Agent description */ - description?: (string|null); - - /** Agent avatarUri */ - avatarUri?: (string|null); - - /** Agent speechToTextSettings */ - speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); - - /** Agent startFlow */ - startFlow?: (string|null); - - /** Agent securitySettings */ - securitySettings?: (string|null); - - /** Agent enableStackdriverLogging */ - enableStackdriverLogging?: (boolean|null); - - /** Agent enableSpellCorrection */ - enableSpellCorrection?: (boolean|null); - - /** Agent locked */ - locked?: (boolean|null); - - /** Agent advancedSettings */ - advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - - /** Agent gitIntegrationSettings */ - gitIntegrationSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null); - - /** Agent textToSpeechSettings */ - textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); - - /** Agent genAppBuilderSettings */ - genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null); + /** LoadVersionRequest allowOverrideAgentResources */ + allowOverrideAgentResources?: (boolean|null); } - /** Represents an Agent. */ - class Agent implements IAgent { + /** Represents a LoadVersionRequest. */ + class LoadVersionRequest implements ILoadVersionRequest { /** - * Constructs a new Agent. + * Constructs a new LoadVersionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent); + constructor(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest); - /** Agent name. */ + /** LoadVersionRequest name. */ public name: string; - /** Agent displayName. */ - public displayName: string; - - /** Agent defaultLanguageCode. */ - public defaultLanguageCode: string; - - /** Agent supportedLanguageCodes. */ - public supportedLanguageCodes: string[]; - - /** Agent timeZone. */ - public timeZone: string; + /** LoadVersionRequest allowOverrideAgentResources. */ + public allowOverrideAgentResources: boolean; - /** Agent description. */ - public description: string; + /** + * Creates a new LoadVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadVersionRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ILoadVersionRequest): google.cloud.dialogflow.cx.v3.LoadVersionRequest; - /** Agent avatarUri. */ - public avatarUri: string; + /** + * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. + * @param message LoadVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Agent speechToTextSettings. */ - public speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + /** + * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. + * @param message LoadVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ILoadVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Agent startFlow. */ - public startFlow: string; + /** + * Decodes a LoadVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadVersionRequest + * @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.LoadVersionRequest; - /** Agent securitySettings. */ - public securitySettings: string; + /** + * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadVersionRequest + * @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.LoadVersionRequest; - /** Agent enableStackdriverLogging. */ - public enableStackdriverLogging: boolean; + /** + * Verifies a LoadVersionRequest 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); - /** Agent enableSpellCorrection. */ - public enableSpellCorrection: boolean; + /** + * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.LoadVersionRequest; - /** Agent locked. */ - public locked: boolean; + /** + * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. + * @param message LoadVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.LoadVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Agent advancedSettings. */ - public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** + * Converts this LoadVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Agent gitIntegrationSettings. */ - public gitIntegrationSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null); + /** + * Gets the default type url for LoadVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Agent textToSpeechSettings. */ - public textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); + /** Properties of a CompareVersionsRequest. */ + interface ICompareVersionsRequest { - /** Agent genAppBuilderSettings. */ - public genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null); + /** CompareVersionsRequest baseVersion */ + baseVersion?: (string|null); - /** Agent _genAppBuilderSettings. */ - public _genAppBuilderSettings?: "genAppBuilderSettings"; + /** CompareVersionsRequest targetVersion */ + targetVersion?: (string|null); + + /** CompareVersionsRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a CompareVersionsRequest. */ + class CompareVersionsRequest implements ICompareVersionsRequest { /** - * Creates a new Agent instance using the specified properties. + * Constructs a new CompareVersionsRequest. * @param [properties] Properties to set - * @returns Agent instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent): google.cloud.dialogflow.cx.v3beta1.Agent; + constructor(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest); + + /** CompareVersionsRequest baseVersion. */ + public baseVersion: string; + + /** CompareVersionsRequest targetVersion. */ + public targetVersion: string; + + /** CompareVersionsRequest languageCode. */ + public languageCode: string; /** - * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. - * @param message Agent message or plain object to encode + * Creates a new CompareVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompareVersionsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; + + /** + * Encodes the specified CompareVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * @param message CompareVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. - * @param message Agent message or plain object to encode + * Encodes the specified CompareVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * @param message CompareVersionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICompareVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Agent message from the specified reader or buffer. + * Decodes a CompareVersionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Agent + * @returns CompareVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; /** - * Decodes an Agent message from the specified reader or buffer, length delimited. + * Decodes a CompareVersionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Agent + * @returns CompareVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; /** - * Verifies an Agent message. + * Verifies a CompareVersionsRequest 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 Agent message from a plain object. Also converts values to their respective internal types. + * Creates a CompareVersionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Agent + * @returns CompareVersionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CompareVersionsRequest; /** - * Creates a plain object from an Agent message. Also converts values to other types if specified. - * @param message Agent + * Creates a plain object from a CompareVersionsRequest message. Also converts values to other types if specified. + * @param message CompareVersionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3.CompareVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Agent to JSON. + * Converts this CompareVersionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Agent + * Gets the default type url for CompareVersionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Agent { + /** Properties of a CompareVersionsResponse. */ + interface ICompareVersionsResponse { - /** Properties of a GitIntegrationSettings. */ - interface IGitIntegrationSettings { + /** CompareVersionsResponse baseVersionContentJson */ + baseVersionContentJson?: (string|null); - /** GitIntegrationSettings githubSettings */ - githubSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null); + /** CompareVersionsResponse targetVersionContentJson */ + targetVersionContentJson?: (string|null); + + /** CompareVersionsResponse compareTime */ + compareTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CompareVersionsResponse. */ + class CompareVersionsResponse implements ICompareVersionsResponse { + + /** + * Constructs a new CompareVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse); + + /** CompareVersionsResponse baseVersionContentJson. */ + public baseVersionContentJson: string; + + /** CompareVersionsResponse targetVersionContentJson. */ + public targetVersionContentJson: string; + + /** CompareVersionsResponse compareTime. */ + public compareTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CompareVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CompareVersionsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse): google.cloud.dialogflow.cx.v3.CompareVersionsResponse; + + /** + * Encodes the specified CompareVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. + * @param message CompareVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompareVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. + * @param message CompareVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICompareVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompareVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompareVersionsResponse + * @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.CompareVersionsResponse; + + /** + * Decodes a CompareVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompareVersionsResponse + * @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.CompareVersionsResponse; + + /** + * Verifies a CompareVersionsResponse 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 CompareVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompareVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CompareVersionsResponse; + + /** + * Creates a plain object from a CompareVersionsResponse message. Also converts values to other types if specified. + * @param message CompareVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CompareVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompareVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompareVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v3beta1. */ + namespace v3beta1 { + + /** Properties of an AdvancedSettings. */ + interface IAdvancedSettings { + + /** AdvancedSettings audioExportGcsDestination */ + audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + + /** AdvancedSettings dtmfSettings */ + dtmfSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null); + + /** AdvancedSettings loggingSettings */ + loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); + } + + /** Represents an AdvancedSettings. */ + class AdvancedSettings implements IAdvancedSettings { + + /** + * Constructs a new AdvancedSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings); + + /** AdvancedSettings audioExportGcsDestination. */ + public audioExportGcsDestination?: (google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null); + + /** AdvancedSettings dtmfSettings. */ + public dtmfSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null); + + /** AdvancedSettings loggingSettings. */ + public loggingSettings?: (google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null); + + /** + * Creates a new AdvancedSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + + /** + * Encodes the specified AdvancedSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. + * @param message AdvancedSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. + * @param message AdvancedSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + + /** + * Decodes an AdvancedSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + + /** + * Verifies an AdvancedSettings 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 AdvancedSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings; + + /** + * Creates a plain object from an AdvancedSettings message. Also converts values to other types if specified. + * @param message AdvancedSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AdvancedSettings { + + /** Properties of a DtmfSettings. */ + interface IDtmfSettings { + + /** DtmfSettings enabled */ + enabled?: (boolean|null); + + /** DtmfSettings maxDigits */ + maxDigits?: (number|null); + + /** DtmfSettings finishDigit */ + finishDigit?: (string|null); } - /** Represents a GitIntegrationSettings. */ - class GitIntegrationSettings implements IGitIntegrationSettings { + /** Represents a DtmfSettings. */ + class DtmfSettings implements IDtmfSettings { /** - * Constructs a new GitIntegrationSettings. + * Constructs a new DtmfSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings); - /** GitIntegrationSettings githubSettings. */ - public githubSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null); + /** DtmfSettings enabled. */ + public enabled: boolean; - /** GitIntegrationSettings gitSettings. */ - public gitSettings?: "githubSettings"; + /** DtmfSettings maxDigits. */ + public maxDigits: number; + + /** DtmfSettings finishDigit. */ + public finishDigit: string; /** - * Creates a new GitIntegrationSettings instance using the specified properties. + * Creates a new DtmfSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GitIntegrationSettings instance + * @returns DtmfSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; /** - * Encodes the specified GitIntegrationSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. - * @param message GitIntegrationSettings message or plain object to encode + * Encodes the specified DtmfSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. + * @param message DtmfSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GitIntegrationSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. - * @param message GitIntegrationSettings message or plain object to encode + * Encodes the specified DtmfSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. + * @param message DtmfSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GitIntegrationSettings message from the specified reader or buffer. + * Decodes a DtmfSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GitIntegrationSettings + * @returns DtmfSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; /** - * Decodes a GitIntegrationSettings message from the specified reader or buffer, length delimited. + * Decodes a DtmfSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GitIntegrationSettings + * @returns DtmfSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; /** - * Verifies a GitIntegrationSettings message. + * Verifies a DtmfSettings 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 GitIntegrationSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DtmfSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GitIntegrationSettings + * @returns DtmfSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings; /** - * Creates a plain object from a GitIntegrationSettings message. Also converts values to other types if specified. - * @param message GitIntegrationSettings + * Creates a plain object from a DtmfSettings message. Also converts values to other types if specified. + * @param message DtmfSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GitIntegrationSettings to JSON. + * Converts this DtmfSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GitIntegrationSettings + * Gets the default type url for DtmfSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GitIntegrationSettings { + /** Properties of a LoggingSettings. */ + interface ILoggingSettings { - /** Properties of a GithubSettings. */ - interface IGithubSettings { + /** LoggingSettings enableStackdriverLogging */ + enableStackdriverLogging?: (boolean|null); - /** GithubSettings displayName */ - displayName?: (string|null); + /** LoggingSettings enableInteractionLogging */ + enableInteractionLogging?: (boolean|null); + } - /** GithubSettings repositoryUri */ - repositoryUri?: (string|null); + /** Represents a LoggingSettings. */ + class LoggingSettings implements ILoggingSettings { - /** GithubSettings trackingBranch */ - trackingBranch?: (string|null); + /** + * Constructs a new LoggingSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings); - /** GithubSettings accessToken */ - accessToken?: (string|null); + /** LoggingSettings enableStackdriverLogging. */ + public enableStackdriverLogging: boolean; - /** GithubSettings branches */ - branches?: (string[]|null); - } + /** LoggingSettings enableInteractionLogging. */ + public enableInteractionLogging: boolean; - /** Represents a GithubSettings. */ - class GithubSettings implements IGithubSettings { + /** + * Creates a new LoggingSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; - /** - * Constructs a new GithubSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings); + /** + * Encodes the specified LoggingSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. + * @param message LoggingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** GithubSettings displayName. */ - public displayName: string; - - /** GithubSettings repositoryUri. */ - public repositoryUri: string; - - /** GithubSettings trackingBranch. */ - public trackingBranch: string; - - /** GithubSettings accessToken. */ - public accessToken: string; - - /** GithubSettings branches. */ - public branches: string[]; - - /** - * Creates a new GithubSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GithubSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - - /** - * Encodes the specified GithubSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. - * @param message GithubSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GithubSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. - * @param message GithubSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GithubSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GithubSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - - /** - * Decodes a GithubSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GithubSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - - /** - * Verifies a GithubSettings 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 GithubSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GithubSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - - /** - * Creates a plain object from a GithubSettings message. Also converts values to other types if specified. - * @param message GithubSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GithubSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GithubSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GenAppBuilderSettings. */ - interface IGenAppBuilderSettings { - - /** GenAppBuilderSettings engine */ - engine?: (string|null); - } - - /** Represents a GenAppBuilderSettings. */ - class GenAppBuilderSettings implements IGenAppBuilderSettings { - - /** - * Constructs a new GenAppBuilderSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings); - - /** GenAppBuilderSettings engine. */ - public engine: string; - - /** - * Creates a new GenAppBuilderSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GenAppBuilderSettings instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; - - /** - * Encodes the specified GenAppBuilderSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. - * @param message GenAppBuilderSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenAppBuilderSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. - * @param message GenAppBuilderSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LoggingSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. + * @param message LoggingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenAppBuilderSettings message from the specified reader or buffer. + * Decodes a LoggingSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GenAppBuilderSettings + * @returns LoggingSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; /** - * Decodes a GenAppBuilderSettings message from the specified reader or buffer, length delimited. + * Decodes a LoggingSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenAppBuilderSettings + * @returns LoggingSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; /** - * Verifies a GenAppBuilderSettings message. + * Verifies a LoggingSettings 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 GenAppBuilderSettings message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenAppBuilderSettings + * @returns LoggingSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings; /** - * Creates a plain object from a GenAppBuilderSettings message. Also converts values to other types if specified. - * @param message GenAppBuilderSettings + * Creates a plain object from a LoggingSettings message. Also converts values to other types if specified. + * @param message LoggingSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenAppBuilderSettings to JSON. + * Converts this LoggingSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenAppBuilderSettings + * Gets the default type url for LoggingSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -34810,7607 +36030,8788 @@ export namespace google { } } - /** Properties of a ListAgentsRequest. */ - interface IListAgentsRequest { - - /** ListAgentsRequest parent */ - parent?: (string|null); - - /** ListAgentsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** ListAgentsRequest pageToken */ - pageToken?: (string|null); + /** GcsDestination uri */ + uri?: (string|null); } - /** Represents a ListAgentsRequest. */ - class ListAgentsRequest implements IListAgentsRequest { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new ListAgentsRequest. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest); - - /** ListAgentsRequest parent. */ - public parent: string; - - /** ListAgentsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination); - /** ListAgentsRequest pageToken. */ - public pageToken: string; + /** GcsDestination uri. */ + public uri: string; /** - * Creates a new ListAgentsRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns ListAgentsRequest instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGcsDestination): google.cloud.dialogflow.cx.v3beta1.GcsDestination; /** - * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @param message ListAgentsRequest message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @param message ListAgentsRequest message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAgentsRequest + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GcsDestination; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAgentsRequest + * @returns GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GcsDestination; /** - * Verifies a ListAgentsRequest message. + * Verifies a GcsDestination 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 ListAgentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAgentsRequest + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GcsDestination; /** - * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. - * @param message ListAgentsRequest + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAgentsRequest to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAgentsRequest + * Gets the default type url for GcsDestination * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAgentsResponse. */ - interface IListAgentsResponse { - - /** ListAgentsResponse agents */ - agents?: (google.cloud.dialogflow.cx.v3beta1.IAgent[]|null); - - /** ListAgentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListAgentsResponse. */ - class ListAgentsResponse implements IListAgentsResponse { + /** Represents an Agents */ + class Agents extends $protobuf.rpc.Service { /** - * Constructs a new ListAgentsResponse. - * @param [properties] Properties to set + * Constructs a new Agents 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.v3beta1.IListAgentsResponse); - - /** ListAgentsResponse agents. */ - public agents: google.cloud.dialogflow.cx.v3beta1.IAgent[]; - - /** ListAgentsResponse nextPageToken. */ - public nextPageToken: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new ListAgentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAgentsResponse instance + * Creates new Agents 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.v3beta1.IListAgentsResponse): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Agents; /** - * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @param message ListAgentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAgentsResponse */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback): void; /** - * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. - * @param message ListAgentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public listAgents(request: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): Promise; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAgentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback): void; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAgentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public getAgent(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): Promise; /** - * Verifies a ListAgentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateAgent. + * @param request CreateAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent */ - public static verify(message: { [k: string]: any }): (string|null); + public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback): void; /** - * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAgentsResponse + * Calls CreateAgent. + * @param request CreateAgentRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; + public createAgent(request: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): Promise; /** - * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. - * @param message ListAgentsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateAgent. + * @param request UpdateAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Agent */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback): void; /** - * Converts this ListAgentsResponse to JSON. - * @returns JSON object + * Calls UpdateAgent. + * @param request UpdateAgentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public updateAgent(request: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): Promise; /** - * Gets the default type url for ListAgentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls DeleteAgent. + * @param request DeleteAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAgentRequest. */ - interface IGetAgentRequest { - - /** GetAgentRequest name */ - name?: (string|null); - } - - /** Represents a GetAgentRequest. */ - class GetAgentRequest implements IGetAgentRequest { + public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback): void; /** - * Constructs a new GetAgentRequest. - * @param [properties] Properties to set + * Calls DeleteAgent. + * @param request DeleteAgentRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest); - - /** GetAgentRequest name. */ - public name: string; + public deleteAgent(request: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): Promise; /** - * Creates a new GetAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAgentRequest instance + * Calls ExportAgent. + * @param request ExportAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback): void; /** - * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. - * @param message GetAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ExportAgent. + * @param request ExportAgentRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public exportAgent(request: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): Promise; /** - * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. - * @param message GetAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RestoreAgent. + * @param request RestoreAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback): void; /** - * Decodes a GetAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RestoreAgent. + * @param request RestoreAgentRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public restoreAgent(request: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): Promise; /** - * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ValidateAgent. + * @param request ValidateAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AgentValidationResult */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public validateAgent(request: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgentCallback): void; /** - * Verifies a GetAgentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ValidateAgent. + * @param request ValidateAgentRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public validateAgent(request: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest): Promise; /** - * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAgentRequest + * Calls GetAgentValidationResult. + * @param request GetAgentValidationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AgentValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; + public getAgentValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResultCallback): void; /** - * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. - * @param message GetAgentRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetAgentValidationResult. + * @param request GetAgentValidationResultRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getAgentValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest): Promise; /** - * Converts this GetAgentRequest to JSON. - * @returns JSON object + * Calls GetGenerativeSettings. + * @param request GetGenerativeSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerativeSettings */ - public toJSON(): { [k: string]: any }; + public getGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettingsCallback): void; /** - * Gets the default type url for GetAgentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetGenerativeSettings. + * @param request GetGenerativeSettingsRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAgentRequest. */ - interface ICreateAgentRequest { + public getGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest): Promise; - /** CreateAgentRequest parent */ - parent?: (string|null); + /** + * Calls UpdateGenerativeSettings. + * @param request UpdateGenerativeSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerativeSettings + */ + public updateGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettingsCallback): void; - /** CreateAgentRequest agent */ - agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** + * Calls UpdateGenerativeSettings. + * @param request UpdateGenerativeSettingsRequest message or plain object + * @returns Promise + */ + public updateGenerativeSettings(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest): Promise; } - /** Represents a CreateAgentRequest. */ - class CreateAgentRequest implements ICreateAgentRequest { + namespace Agents { /** - * Constructs a new CreateAgentRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|listAgents}. + * @param error Error, if any + * @param [response] ListAgentsResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest); - - /** CreateAgentRequest parent. */ - public parent: string; - - /** CreateAgentRequest agent. */ - public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + type ListAgentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) => void; /** - * Creates a new CreateAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAgentRequest instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgent}. + * @param error Error, if any + * @param [response] Agent */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + type GetAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; /** - * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. - * @param message CreateAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|createAgent}. + * @param error Error, if any + * @param [response] Agent */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; /** - * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. - * @param message CreateAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateAgent}. + * @param error Error, if any + * @param [response] Agent */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Agent) => void; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAgentRequest - * @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.v3beta1.Agents|deleteAgent}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + type DeleteAgentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAgentRequest - * @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.v3beta1.Agents|exportAgent}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + type ExportAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a CreateAgentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|restoreAgent}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type RestoreAgentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAgentRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|validateAgent}. + * @param error Error, if any + * @param [response] AgentValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; + type ValidateAgentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) => void; /** - * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. - * @param message CreateAgentRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgentValidationResult}. + * @param error Error, if any + * @param [response] AgentValidationResult */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetAgentValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) => void; /** - * Converts this CreateAgentRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getGenerativeSettings}. + * @param error Error, if any + * @param [response] GenerativeSettings */ - public toJSON(): { [k: string]: any }; + type GetGenerativeSettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) => void; /** - * Gets the default type url for CreateAgentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateGenerativeSettings}. + * @param error Error, if any + * @param [response] GenerativeSettings */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type UpdateGenerativeSettingsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) => void; } - /** Properties of an UpdateAgentRequest. */ - interface IUpdateAgentRequest { - - /** UpdateAgentRequest agent */ - agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + /** Properties of a SpeechToTextSettings. */ + interface ISpeechToTextSettings { - /** UpdateAgentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** SpeechToTextSettings enableSpeechAdaptation */ + enableSpeechAdaptation?: (boolean|null); } - /** Represents an UpdateAgentRequest. */ - class UpdateAgentRequest implements IUpdateAgentRequest { + /** Represents a SpeechToTextSettings. */ + class SpeechToTextSettings implements ISpeechToTextSettings { /** - * Constructs a new UpdateAgentRequest. + * Constructs a new SpeechToTextSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest); - - /** UpdateAgentRequest agent. */ - public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings); - /** UpdateAgentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SpeechToTextSettings enableSpeechAdaptation. */ + public enableSpeechAdaptation: boolean; /** - * Creates a new UpdateAgentRequest instance using the specified properties. + * Creates a new SpeechToTextSettings instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateAgentRequest instance + * @returns SpeechToTextSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @param message UpdateAgentRequest message or plain object to encode + * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * @param message SpeechToTextSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @param message UpdateAgentRequest message or plain object to encode + * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * @param message SpeechToTextSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer. + * Decodes a SpeechToTextSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateAgentRequest + * @returns SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateAgentRequest + * @returns SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Verifies an UpdateAgentRequest message. + * Verifies a SpeechToTextSettings 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 UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateAgentRequest + * @returns SpeechToTextSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings; /** - * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. - * @param message UpdateAgentRequest + * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. + * @param message SpeechToTextSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateAgentRequest to JSON. + * Converts this SpeechToTextSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateAgentRequest + * Gets the default type url for SpeechToTextSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteAgentRequest. */ - interface IDeleteAgentRequest { + /** Properties of an Agent. */ + interface IAgent { - /** DeleteAgentRequest name */ + /** Agent name */ name?: (string|null); - } - - /** Represents a DeleteAgentRequest. */ - class DeleteAgentRequest implements IDeleteAgentRequest { - - /** - * Constructs a new DeleteAgentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest); - - /** DeleteAgentRequest name. */ - public name: string; - /** - * Creates a new DeleteAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAgentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** Agent displayName */ + displayName?: (string|null); - /** - * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. - * @param message DeleteAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Agent defaultLanguageCode */ + defaultLanguageCode?: (string|null); - /** - * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. - * @param message DeleteAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Agent supportedLanguageCodes */ + supportedLanguageCodes?: (string[]|null); - /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** Agent timeZone */ + timeZone?: (string|null); - /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** Agent description */ + description?: (string|null); - /** - * Verifies a DeleteAgentRequest 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); + /** Agent avatarUri */ + avatarUri?: (string|null); - /** - * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAgentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; + /** Agent speechToTextSettings */ + speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); - /** - * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. - * @param message DeleteAgentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Agent startFlow */ + startFlow?: (string|null); - /** - * Converts this DeleteAgentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Agent securitySettings */ + securitySettings?: (string|null); - /** - * Gets the default type url for DeleteAgentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Agent enableStackdriverLogging */ + enableStackdriverLogging?: (boolean|null); - /** Properties of an ExportAgentRequest. */ - interface IExportAgentRequest { + /** Agent enableSpellCorrection */ + enableSpellCorrection?: (boolean|null); - /** ExportAgentRequest name */ - name?: (string|null); + /** Agent locked */ + locked?: (boolean|null); - /** ExportAgentRequest agentUri */ - agentUri?: (string|null); + /** Agent advancedSettings */ + advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - /** ExportAgentRequest dataFormat */ - dataFormat?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null); + /** Agent gitIntegrationSettings */ + gitIntegrationSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null); - /** ExportAgentRequest environment */ - environment?: (string|null); + /** Agent textToSpeechSettings */ + textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); - /** ExportAgentRequest gitDestination */ - gitDestination?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null); + /** Agent genAppBuilderSettings */ + genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null); - /** ExportAgentRequest includeBigqueryExportSettings */ - includeBigqueryExportSettings?: (boolean|null); + /** Agent answerFeedbackSettings */ + answerFeedbackSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings|null); } - /** Represents an ExportAgentRequest. */ - class ExportAgentRequest implements IExportAgentRequest { + /** Represents an Agent. */ + class Agent implements IAgent { /** - * Constructs a new ExportAgentRequest. + * Constructs a new Agent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent); - /** ExportAgentRequest name. */ + /** Agent name. */ public name: string; - /** ExportAgentRequest agentUri. */ - public agentUri: string; + /** Agent displayName. */ + public displayName: string; - /** ExportAgentRequest dataFormat. */ - public dataFormat: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat); + /** Agent defaultLanguageCode. */ + public defaultLanguageCode: string; - /** ExportAgentRequest environment. */ - public environment: string; + /** Agent supportedLanguageCodes. */ + public supportedLanguageCodes: string[]; - /** ExportAgentRequest gitDestination. */ - public gitDestination?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null); + /** Agent timeZone. */ + public timeZone: string; - /** ExportAgentRequest includeBigqueryExportSettings. */ - public includeBigqueryExportSettings: boolean; + /** Agent description. */ + public description: string; + + /** Agent avatarUri. */ + public avatarUri: string; + + /** Agent speechToTextSettings. */ + public speechToTextSettings?: (google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null); + + /** Agent startFlow. */ + public startFlow: string; + + /** Agent securitySettings. */ + public securitySettings: string; + + /** Agent enableStackdriverLogging. */ + public enableStackdriverLogging: boolean; + + /** Agent enableSpellCorrection. */ + public enableSpellCorrection: boolean; + + /** Agent locked. */ + public locked: boolean; + + /** Agent advancedSettings. */ + public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Agent gitIntegrationSettings. */ + public gitIntegrationSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null); + + /** Agent textToSpeechSettings. */ + public textToSpeechSettings?: (google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null); + + /** Agent genAppBuilderSettings. */ + public genAppBuilderSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null); + + /** Agent answerFeedbackSettings. */ + public answerFeedbackSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings|null); + + /** Agent _genAppBuilderSettings. */ + public _genAppBuilderSettings?: "genAppBuilderSettings"; /** - * Creates a new ExportAgentRequest instance using the specified properties. + * Creates a new Agent instance using the specified properties. * @param [properties] Properties to set - * @returns ExportAgentRequest instance + * @returns Agent instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgent): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. - * @param message ExportAgentRequest message or plain object to encode + * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * @param message Agent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. - * @param message ExportAgentRequest message or plain object to encode + * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * @param message Agent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer. + * Decodes an Agent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportAgentRequest + * @returns Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. + * Decodes an Agent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportAgentRequest + * @returns Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Verifies an ExportAgentRequest message. + * Verifies an Agent 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 ExportAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Agent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportAgentRequest + * @returns Agent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent; /** - * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. - * @param message ExportAgentRequest + * Creates a plain object from an Agent message. Also converts values to other types if specified. + * @param message Agent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportAgentRequest to JSON. + * Converts this Agent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportAgentRequest + * Gets the default type url for Agent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ExportAgentRequest { - - /** DataFormat enum. */ - enum DataFormat { - DATA_FORMAT_UNSPECIFIED = 0, - BLOB = 1, - JSON_PACKAGE = 4 - } - - /** Properties of a GitDestination. */ - interface IGitDestination { + namespace Agent { - /** GitDestination trackingBranch */ - trackingBranch?: (string|null); + /** Properties of a GitIntegrationSettings. */ + interface IGitIntegrationSettings { - /** GitDestination commitMessage */ - commitMessage?: (string|null); + /** GitIntegrationSettings githubSettings */ + githubSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null); } - /** Represents a GitDestination. */ - class GitDestination implements IGitDestination { + /** Represents a GitIntegrationSettings. */ + class GitIntegrationSettings implements IGitIntegrationSettings { /** - * Constructs a new GitDestination. + * Constructs a new GitIntegrationSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings); - /** GitDestination trackingBranch. */ - public trackingBranch: string; + /** GitIntegrationSettings githubSettings. */ + public githubSettings?: (google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null); - /** GitDestination commitMessage. */ - public commitMessage: string; + /** GitIntegrationSettings gitSettings. */ + public gitSettings?: "githubSettings"; /** - * Creates a new GitDestination instance using the specified properties. + * Creates a new GitIntegrationSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GitDestination instance + * @returns GitIntegrationSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; /** - * Encodes the specified GitDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. - * @param message GitDestination message or plain object to encode + * Encodes the specified GitIntegrationSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. + * @param message GitIntegrationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GitDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. - * @param message GitDestination message or plain object to encode + * Encodes the specified GitIntegrationSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. + * @param message GitIntegrationSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GitDestination message from the specified reader or buffer. + * Decodes a GitIntegrationSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GitDestination + * @returns GitIntegrationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; /** - * Decodes a GitDestination message from the specified reader or buffer, length delimited. + * Decodes a GitIntegrationSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GitDestination + * @returns GitIntegrationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; /** - * Verifies a GitDestination message. + * Verifies a GitIntegrationSettings 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 GitDestination message from a plain object. Also converts values to their respective internal types. + * Creates a GitIntegrationSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GitDestination + * @returns GitIntegrationSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings; /** - * Creates a plain object from a GitDestination message. Also converts values to other types if specified. - * @param message GitDestination + * Creates a plain object from a GitIntegrationSettings message. Also converts values to other types if specified. + * @param message GitIntegrationSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GitDestination to JSON. + * Converts this GitIntegrationSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GitDestination + * Gets the default type url for GitIntegrationSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Properties of an ExportAgentResponse. */ - interface IExportAgentResponse { + namespace GitIntegrationSettings { - /** ExportAgentResponse agentUri */ - agentUri?: (string|null); + /** Properties of a GithubSettings. */ + interface IGithubSettings { - /** ExportAgentResponse agentContent */ - agentContent?: (Uint8Array|string|null); + /** GithubSettings displayName */ + displayName?: (string|null); - /** ExportAgentResponse commitSha */ - commitSha?: (string|null); - } + /** GithubSettings repositoryUri */ + repositoryUri?: (string|null); - /** Represents an ExportAgentResponse. */ - class ExportAgentResponse implements IExportAgentResponse { + /** GithubSettings trackingBranch */ + trackingBranch?: (string|null); - /** - * Constructs a new ExportAgentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse); + /** GithubSettings accessToken */ + accessToken?: (string|null); - /** ExportAgentResponse agentUri. */ - public agentUri?: (string|null); - - /** ExportAgentResponse agentContent. */ - public agentContent?: (Uint8Array|string|null); - - /** ExportAgentResponse commitSha. */ - public commitSha?: (string|null); - - /** ExportAgentResponse agent. */ - public agent?: ("agentUri"|"agentContent"|"commitSha"); - - /** - * Creates a new ExportAgentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportAgentResponse instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; - - /** - * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. - * @param message ExportAgentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. - * @param message ExportAgentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** GithubSettings branches */ + branches?: (string[]|null); + } - /** - * Decodes an ExportAgentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportAgentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** Represents a GithubSettings. */ + class GithubSettings implements IGithubSettings { - /** - * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportAgentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** + * Constructs a new GithubSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings); - /** - * Verifies an ExportAgentResponse 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); + /** GithubSettings displayName. */ + public displayName: string; - /** - * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportAgentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + /** GithubSettings repositoryUri. */ + public repositoryUri: string; - /** - * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. - * @param message ExportAgentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GithubSettings trackingBranch. */ + public trackingBranch: string; - /** - * Converts this ExportAgentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** GithubSettings accessToken. */ + public accessToken: string; - /** - * Gets the default type url for ExportAgentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** GithubSettings branches. */ + public branches: string[]; - /** Properties of a RestoreAgentRequest. */ - interface IRestoreAgentRequest { + /** + * Creates a new GithubSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GithubSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - /** RestoreAgentRequest name */ - name?: (string|null); + /** + * Encodes the specified GithubSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. + * @param message GithubSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** RestoreAgentRequest agentUri */ - agentUri?: (string|null); + /** + * Encodes the specified GithubSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. + * @param message GithubSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** RestoreAgentRequest agentContent */ - agentContent?: (Uint8Array|string|null); + /** + * Decodes a GithubSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GithubSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - /** RestoreAgentRequest gitSource */ - gitSource?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null); + /** + * Decodes a GithubSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GithubSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - /** RestoreAgentRequest restoreOption */ - restoreOption?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|null); - } + /** + * Verifies a GithubSettings 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); - /** Represents a RestoreAgentRequest. */ - class RestoreAgentRequest implements IRestoreAgentRequest { + /** + * Creates a GithubSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GithubSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings; - /** - * Constructs a new RestoreAgentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest); + /** + * Creates a plain object from a GithubSettings message. Also converts values to other types if specified. + * @param message GithubSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RestoreAgentRequest name. */ - public name: string; + /** + * Converts this GithubSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RestoreAgentRequest agentUri. */ - public agentUri?: (string|null); + /** + * Gets the default type url for GithubSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** RestoreAgentRequest agentContent. */ - public agentContent?: (Uint8Array|string|null); + /** Properties of a GenAppBuilderSettings. */ + interface IGenAppBuilderSettings { - /** RestoreAgentRequest gitSource. */ - public gitSource?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null); + /** GenAppBuilderSettings engine */ + engine?: (string|null); + } - /** RestoreAgentRequest restoreOption. */ - public restoreOption: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption); + /** Represents a GenAppBuilderSettings. */ + class GenAppBuilderSettings implements IGenAppBuilderSettings { - /** RestoreAgentRequest agent. */ - public agent?: ("agentUri"|"agentContent"|"gitSource"); + /** + * Constructs a new GenAppBuilderSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings); - /** - * Creates a new RestoreAgentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreAgentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** GenAppBuilderSettings engine. */ + public engine: string; - /** - * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. - * @param message RestoreAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new GenAppBuilderSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GenAppBuilderSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; - /** - * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. - * @param message RestoreAgentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GenAppBuilderSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. + * @param message GenAppBuilderSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Encodes the specified GenAppBuilderSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. + * @param message GenAppBuilderSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Decodes a GenAppBuilderSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenAppBuilderSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; - /** - * Verifies a RestoreAgentRequest 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 GenAppBuilderSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenAppBuilderSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; - /** - * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreAgentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; + /** + * Verifies a GenAppBuilderSettings 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 a RestoreAgentRequest message. Also converts values to other types if specified. - * @param message RestoreAgentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a GenAppBuilderSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenAppBuilderSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings; - /** - * Converts this RestoreAgentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a GenAppBuilderSettings message. Also converts values to other types if specified. + * @param message GenAppBuilderSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for RestoreAgentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this GenAppBuilderSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace RestoreAgentRequest { + /** + * Gets the default type url for GenAppBuilderSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a GitSource. */ - interface IGitSource { + /** Properties of an AnswerFeedbackSettings. */ + interface IAnswerFeedbackSettings { - /** GitSource trackingBranch */ - trackingBranch?: (string|null); + /** AnswerFeedbackSettings enableAnswerFeedback */ + enableAnswerFeedback?: (boolean|null); } - /** Represents a GitSource. */ - class GitSource implements IGitSource { + /** Represents an AnswerFeedbackSettings. */ + class AnswerFeedbackSettings implements IAnswerFeedbackSettings { /** - * Constructs a new GitSource. + * Constructs a new AnswerFeedbackSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings); - /** GitSource trackingBranch. */ - public trackingBranch: string; + /** AnswerFeedbackSettings enableAnswerFeedback. */ + public enableAnswerFeedback: boolean; /** - * Creates a new GitSource instance using the specified properties. + * Creates a new AnswerFeedbackSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GitSource instance + * @returns AnswerFeedbackSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings): google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings; /** - * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. - * @param message GitSource message or plain object to encode + * Encodes the specified AnswerFeedbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @param message AnswerFeedbackSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. - * @param message GitSource message or plain object to encode + * Encodes the specified AnswerFeedbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @param message AnswerFeedbackSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GitSource message from the specified reader or buffer. + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GitSource + * @returns AnswerFeedbackSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings; /** - * Decodes a GitSource message from the specified reader or buffer, length delimited. + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GitSource + * @returns AnswerFeedbackSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings; /** - * Verifies a GitSource message. + * Verifies an AnswerFeedbackSettings 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 GitSource message from a plain object. Also converts values to their respective internal types. + * Creates an AnswerFeedbackSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GitSource + * @returns AnswerFeedbackSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings; /** - * Creates a plain object from a GitSource message. Also converts values to other types if specified. - * @param message GitSource + * Creates a plain object from an AnswerFeedbackSettings message. Also converts values to other types if specified. + * @param message AnswerFeedbackSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GitSource to JSON. + * Converts this AnswerFeedbackSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GitSource + * Gets the default type url for AnswerFeedbackSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** RestoreOption enum. */ - enum RestoreOption { - RESTORE_OPTION_UNSPECIFIED = 0, - KEEP = 1, - FALLBACK = 2 - } } - /** Properties of a ValidateAgentRequest. */ - interface IValidateAgentRequest { + /** Properties of a ListAgentsRequest. */ + interface IListAgentsRequest { - /** ValidateAgentRequest name */ - name?: (string|null); + /** ListAgentsRequest parent */ + parent?: (string|null); - /** ValidateAgentRequest languageCode */ - languageCode?: (string|null); + /** ListAgentsRequest pageSize */ + pageSize?: (number|null); + + /** ListAgentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ValidateAgentRequest. */ - class ValidateAgentRequest implements IValidateAgentRequest { + /** Represents a ListAgentsRequest. */ + class ListAgentsRequest implements IListAgentsRequest { /** - * Constructs a new ValidateAgentRequest. + * Constructs a new ListAgentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest); - /** ValidateAgentRequest name. */ - public name: string; + /** ListAgentsRequest parent. */ + public parent: string; - /** ValidateAgentRequest languageCode. */ - public languageCode: string; + /** ListAgentsRequest pageSize. */ + public pageSize: number; + + /** ListAgentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ValidateAgentRequest instance using the specified properties. + * Creates a new ListAgentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateAgentRequest instance + * @returns ListAgentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Encodes the specified ValidateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. - * @param message ValidateAgentRequest message or plain object to encode + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. + * @param message ListAgentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. - * @param message ValidateAgentRequest message or plain object to encode + * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. + * @param message ListAgentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateAgentRequest message from the specified reader or buffer. + * Decodes a ListAgentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateAgentRequest + * @returns ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Decodes a ValidateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateAgentRequest + * @returns ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Verifies a ValidateAgentRequest message. + * Verifies a ListAgentsRequest 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 ValidateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateAgentRequest + * @returns ListAgentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest; /** - * Creates a plain object from a ValidateAgentRequest message. Also converts values to other types if specified. - * @param message ValidateAgentRequest + * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. + * @param message ListAgentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateAgentRequest to JSON. + * Converts this ListAgentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidateAgentRequest + * Gets the default type url for ListAgentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetAgentValidationResultRequest. */ - interface IGetAgentValidationResultRequest { + /** Properties of a ListAgentsResponse. */ + interface IListAgentsResponse { - /** GetAgentValidationResultRequest name */ - name?: (string|null); + /** ListAgentsResponse agents */ + agents?: (google.cloud.dialogflow.cx.v3beta1.IAgent[]|null); - /** GetAgentValidationResultRequest languageCode */ - languageCode?: (string|null); + /** ListAgentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetAgentValidationResultRequest. */ - class GetAgentValidationResultRequest implements IGetAgentValidationResultRequest { + /** Represents a ListAgentsResponse. */ + class ListAgentsResponse implements IListAgentsResponse { /** - * Constructs a new GetAgentValidationResultRequest. + * Constructs a new ListAgentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse); - /** GetAgentValidationResultRequest name. */ - public name: string; + /** ListAgentsResponse agents. */ + public agents: google.cloud.dialogflow.cx.v3beta1.IAgent[]; - /** GetAgentValidationResultRequest languageCode. */ - public languageCode: string; + /** ListAgentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetAgentValidationResultRequest instance using the specified properties. + * Creates a new ListAgentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetAgentValidationResultRequest instance + * @returns ListAgentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Encodes the specified GetAgentValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. - * @param message GetAgentValidationResultRequest message or plain object to encode + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @param message ListAgentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAgentValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. - * @param message GetAgentValidationResultRequest message or plain object to encode + * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * @param message ListAgentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer. + * Decodes a ListAgentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAgentValidationResultRequest + * @returns ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAgentValidationResultRequest + * @returns ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Verifies a GetAgentValidationResultRequest message. + * Verifies a ListAgentsResponse 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 GetAgentValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAgentValidationResultRequest + * @returns ListAgentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse; /** - * Creates a plain object from a GetAgentValidationResultRequest message. Also converts values to other types if specified. - * @param message GetAgentValidationResultRequest + * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. + * @param message ListAgentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAgentValidationResultRequest to JSON. + * Converts this ListAgentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetAgentValidationResultRequest + * Gets the default type url for ListAgentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AgentValidationResult. */ - interface IAgentValidationResult { + /** Properties of a GetAgentRequest. */ + interface IGetAgentRequest { - /** AgentValidationResult name */ + /** GetAgentRequest name */ name?: (string|null); - - /** AgentValidationResult flowValidationResults */ - flowValidationResults?: (google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult[]|null); } - /** Represents an AgentValidationResult. */ - class AgentValidationResult implements IAgentValidationResult { + /** Represents a GetAgentRequest. */ + class GetAgentRequest implements IGetAgentRequest { /** - * Constructs a new AgentValidationResult. + * Constructs a new GetAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest); - /** AgentValidationResult name. */ + /** GetAgentRequest name. */ public name: string; - /** AgentValidationResult flowValidationResults. */ - public flowValidationResults: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult[]; - /** - * Creates a new AgentValidationResult instance using the specified properties. + * Creates a new GetAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AgentValidationResult instance + * @returns GetAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Encodes the specified AgentValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. - * @param message AgentValidationResult message or plain object to encode + * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * @param message GetAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AgentValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. - * @param message AgentValidationResult message or plain object to encode + * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * @param message GetAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AgentValidationResult message from the specified reader or buffer. + * Decodes a GetAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AgentValidationResult + * @returns GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Decodes an AgentValidationResult message from the specified reader or buffer, length delimited. + * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AgentValidationResult + * @returns GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Verifies an AgentValidationResult message. + * Verifies a GetAgentRequest 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 AgentValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AgentValidationResult + * @returns GetAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentRequest; /** - * Creates a plain object from an AgentValidationResult message. Also converts values to other types if specified. - * @param message AgentValidationResult + * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. + * @param message GetAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AgentValidationResult to JSON. + * Converts this GetAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AgentValidationResult + * Gets the default type url for GetAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetGenerativeSettingsRequest. */ - interface IGetGenerativeSettingsRequest { + /** Properties of a CreateAgentRequest. */ + interface ICreateAgentRequest { - /** GetGenerativeSettingsRequest name */ - name?: (string|null); + /** CreateAgentRequest parent */ + parent?: (string|null); - /** GetGenerativeSettingsRequest languageCode */ - languageCode?: (string|null); + /** CreateAgentRequest agent */ + agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); } - /** Represents a GetGenerativeSettingsRequest. */ - class GetGenerativeSettingsRequest implements IGetGenerativeSettingsRequest { + /** Represents a CreateAgentRequest. */ + class CreateAgentRequest implements ICreateAgentRequest { /** - * Constructs a new GetGenerativeSettingsRequest. + * Constructs a new CreateAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest); - /** GetGenerativeSettingsRequest name. */ - public name: string; + /** CreateAgentRequest parent. */ + public parent: string; - /** GetGenerativeSettingsRequest languageCode. */ - public languageCode: string; + /** CreateAgentRequest agent. */ + public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); /** - * Creates a new GetGenerativeSettingsRequest instance using the specified properties. + * Creates a new CreateAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetGenerativeSettingsRequest instance + * @returns CreateAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; /** - * Encodes the specified GetGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. - * @param message GetGenerativeSettingsRequest message or plain object to encode + * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * @param message CreateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. - * @param message GetGenerativeSettingsRequest message or plain object to encode + * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * @param message CreateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer. + * Decodes a CreateAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetGenerativeSettingsRequest + * @returns CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; /** - * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetGenerativeSettingsRequest + * @returns CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; /** - * Verifies a GetGenerativeSettingsRequest message. + * Verifies a CreateAgentRequest 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 GetGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetGenerativeSettingsRequest + * @returns CreateAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest; /** - * Creates a plain object from a GetGenerativeSettingsRequest message. Also converts values to other types if specified. - * @param message GetGenerativeSettingsRequest + * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. + * @param message CreateAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetGenerativeSettingsRequest to JSON. + * Converts this CreateAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetGenerativeSettingsRequest + * Gets the default type url for CreateAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateGenerativeSettingsRequest. */ - interface IUpdateGenerativeSettingsRequest { + /** Properties of an UpdateAgentRequest. */ + interface IUpdateAgentRequest { - /** UpdateGenerativeSettingsRequest generativeSettings */ - generativeSettings?: (google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null); + /** UpdateAgentRequest agent */ + agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); - /** UpdateGenerativeSettingsRequest updateMask */ + /** UpdateAgentRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateGenerativeSettingsRequest. */ - class UpdateGenerativeSettingsRequest implements IUpdateGenerativeSettingsRequest { + /** Represents an UpdateAgentRequest. */ + class UpdateAgentRequest implements IUpdateAgentRequest { /** - * Constructs a new UpdateGenerativeSettingsRequest. + * Constructs a new UpdateAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest); - /** UpdateGenerativeSettingsRequest generativeSettings. */ - public generativeSettings?: (google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null); + /** UpdateAgentRequest agent. */ + public agent?: (google.cloud.dialogflow.cx.v3beta1.IAgent|null); - /** UpdateGenerativeSettingsRequest updateMask. */ + /** UpdateAgentRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UpdateGenerativeSettingsRequest instance using the specified properties. + * Creates a new UpdateAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateGenerativeSettingsRequest instance + * @returns UpdateAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Encodes the specified UpdateGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. - * @param message UpdateGenerativeSettingsRequest message or plain object to encode + * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @param message UpdateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. - * @param message UpdateGenerativeSettingsRequest message or plain object to encode + * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. + * @param message UpdateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer. + * Decodes an UpdateAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateGenerativeSettingsRequest + * @returns UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateGenerativeSettingsRequest + * @returns UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Verifies an UpdateGenerativeSettingsRequest message. + * Verifies an UpdateAgentRequest 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 UpdateGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateGenerativeSettingsRequest + * @returns UpdateAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest; /** - * Creates a plain object from an UpdateGenerativeSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateGenerativeSettingsRequest + * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. + * @param message UpdateAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateGenerativeSettingsRequest to JSON. + * Converts this UpdateAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateGenerativeSettingsRequest + * Gets the default type url for UpdateAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** AudioEncoding enum. */ - enum AudioEncoding { - AUDIO_ENCODING_UNSPECIFIED = 0, - AUDIO_ENCODING_LINEAR_16 = 1, - AUDIO_ENCODING_FLAC = 2, - AUDIO_ENCODING_MULAW = 3, - AUDIO_ENCODING_AMR = 4, - AUDIO_ENCODING_AMR_WB = 5, - AUDIO_ENCODING_OGG_OPUS = 6, - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 - } - - /** SpeechModelVariant enum. */ - enum SpeechModelVariant { - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, - USE_BEST_AVAILABLE = 1, - USE_STANDARD = 2, - USE_ENHANCED = 3 - } - - /** Properties of a SpeechWordInfo. */ - interface ISpeechWordInfo { - - /** SpeechWordInfo word */ - word?: (string|null); - - /** SpeechWordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); + /** Properties of a DeleteAgentRequest. */ + interface IDeleteAgentRequest { - /** SpeechWordInfo confidence */ - confidence?: (number|null); + /** DeleteAgentRequest name */ + name?: (string|null); } - /** Represents a SpeechWordInfo. */ - class SpeechWordInfo implements ISpeechWordInfo { + /** Represents a DeleteAgentRequest. */ + class DeleteAgentRequest implements IDeleteAgentRequest { /** - * Constructs a new SpeechWordInfo. + * Constructs a new DeleteAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - - /** SpeechWordInfo word. */ - public word: string; - - /** SpeechWordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); - - /** SpeechWordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest); - /** SpeechWordInfo confidence. */ - public confidence: number; + /** DeleteAgentRequest name. */ + public name: string; /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new DeleteAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechWordInfo instance + * @returns DeleteAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @param message DeleteAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * @param message DeleteAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a DeleteAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechWordInfo + * @returns DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechWordInfo + * @returns DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Verifies a SpeechWordInfo message. + * Verifies a DeleteAgentRequest 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 SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechWordInfo + * @returns DeleteAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest; /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. - * @param message SpeechWordInfo + * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. + * @param message DeleteAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this DeleteAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SpeechWordInfo + * Gets the default type url for DeleteAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InputAudioConfig. */ - interface IInputAudioConfig { - - /** InputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); + /** Properties of an ExportAgentRequest. */ + interface IExportAgentRequest { - /** InputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** ExportAgentRequest name */ + name?: (string|null); - /** InputAudioConfig enableWordInfo */ - enableWordInfo?: (boolean|null); + /** ExportAgentRequest agentUri */ + agentUri?: (string|null); - /** InputAudioConfig phraseHints */ - phraseHints?: (string[]|null); + /** ExportAgentRequest dataFormat */ + dataFormat?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null); - /** InputAudioConfig model */ - model?: (string|null); + /** ExportAgentRequest environment */ + environment?: (string|null); - /** InputAudioConfig modelVariant */ - modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); + /** ExportAgentRequest gitDestination */ + gitDestination?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null); - /** InputAudioConfig singleUtterance */ - singleUtterance?: (boolean|null); + /** ExportAgentRequest includeBigqueryExportSettings */ + includeBigqueryExportSettings?: (boolean|null); } - /** Represents an InputAudioConfig. */ - class InputAudioConfig implements IInputAudioConfig { + /** Represents an ExportAgentRequest. */ + class ExportAgentRequest implements IExportAgentRequest { /** - * Constructs a new InputAudioConfig. + * Constructs a new ExportAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - - /** InputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest); - /** InputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** ExportAgentRequest name. */ + public name: string; - /** InputAudioConfig enableWordInfo. */ - public enableWordInfo: boolean; + /** ExportAgentRequest agentUri. */ + public agentUri: string; - /** InputAudioConfig phraseHints. */ - public phraseHints: string[]; + /** ExportAgentRequest dataFormat. */ + public dataFormat: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat); - /** InputAudioConfig model. */ - public model: string; + /** ExportAgentRequest environment. */ + public environment: string; - /** InputAudioConfig modelVariant. */ - public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); + /** ExportAgentRequest gitDestination. */ + public gitDestination?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null); - /** InputAudioConfig singleUtterance. */ - public singleUtterance: boolean; + /** ExportAgentRequest includeBigqueryExportSettings. */ + public includeBigqueryExportSettings: boolean; /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new ExportAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InputAudioConfig instance + * @returns ExportAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * @param message ExportAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * @param message ExportAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes an ExportAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InputAudioConfig + * @returns ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputAudioConfig + * @returns ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; /** - * Verifies an InputAudioConfig message. + * Verifies an ExportAgentRequest 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 InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputAudioConfig + * @returns ExportAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. - * @param message InputAudioConfig + * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. + * @param message ExportAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputAudioConfig to JSON. + * Converts this ExportAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InputAudioConfig + * Gets the default type url for ExportAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** SsmlVoiceGender enum. */ - enum SsmlVoiceGender { - SSML_VOICE_GENDER_UNSPECIFIED = 0, - SSML_VOICE_GENDER_MALE = 1, - SSML_VOICE_GENDER_FEMALE = 2, - SSML_VOICE_GENDER_NEUTRAL = 3 - } + namespace ExportAgentRequest { - /** Properties of a VoiceSelectionParams. */ - interface IVoiceSelectionParams { + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + BLOB = 1, + JSON_PACKAGE = 4 + } - /** VoiceSelectionParams name */ - name?: (string|null); + /** Properties of a GitDestination. */ + interface IGitDestination { - /** VoiceSelectionParams ssmlGender */ - ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); - } + /** GitDestination trackingBranch */ + trackingBranch?: (string|null); - /** Represents a VoiceSelectionParams. */ - class VoiceSelectionParams implements IVoiceSelectionParams { + /** GitDestination commitMessage */ + commitMessage?: (string|null); + } - /** - * Constructs a new VoiceSelectionParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); + /** Represents a GitDestination. */ + class GitDestination implements IGitDestination { - /** VoiceSelectionParams name. */ - public name: string; + /** + * Constructs a new GitDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination); - /** VoiceSelectionParams ssmlGender. */ - public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); + /** GitDestination trackingBranch. */ + public trackingBranch: string; + + /** GitDestination commitMessage. */ + public commitMessage: string; + + /** + * Creates a new GitDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GitDestination instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + + /** + * Encodes the specified GitDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * @param message GitDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * @param message GitDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + + /** + * Decodes a GitDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + + /** + * Verifies a GitDestination 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 GitDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination; + + /** + * Creates a plain object from a GitDestination message. Also converts values to other types if specified. + * @param message GitDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExportAgentResponse. */ + interface IExportAgentResponse { + + /** ExportAgentResponse agentUri */ + agentUri?: (string|null); + + /** ExportAgentResponse agentContent */ + agentContent?: (Uint8Array|string|null); + + /** ExportAgentResponse commitSha */ + commitSha?: (string|null); + } + + /** Represents an ExportAgentResponse. */ + class ExportAgentResponse implements IExportAgentResponse { /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Constructs a new ExportAgentResponse. * @param [properties] Properties to set - * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse); + + /** ExportAgentResponse agentUri. */ + public agentUri?: (string|null); + + /** ExportAgentResponse agentContent. */ + public agentContent?: (Uint8Array|string|null); + + /** ExportAgentResponse commitSha. */ + public commitSha?: (string|null); + + /** ExportAgentResponse agent. */ + public agent?: ("agentUri"|"agentContent"|"commitSha"); /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Creates a new ExportAgentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportAgentResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; + + /** + * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * @param message ExportAgentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * @param message ExportAgentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes an ExportAgentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VoiceSelectionParams + * @returns ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VoiceSelectionParams + * @returns ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Verifies a VoiceSelectionParams message. + * Verifies an ExportAgentResponse 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 VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VoiceSelectionParams + * @returns ExportAgentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. - * @param message VoiceSelectionParams + * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. + * @param message ExportAgentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this ExportAgentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VoiceSelectionParams + * Gets the default type url for ExportAgentResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SynthesizeSpeechConfig. */ - interface ISynthesizeSpeechConfig { + /** Properties of a RestoreAgentRequest. */ + interface IRestoreAgentRequest { - /** SynthesizeSpeechConfig speakingRate */ - speakingRate?: (number|null); + /** RestoreAgentRequest name */ + name?: (string|null); - /** SynthesizeSpeechConfig pitch */ - pitch?: (number|null); + /** RestoreAgentRequest agentUri */ + agentUri?: (string|null); - /** SynthesizeSpeechConfig volumeGainDb */ - volumeGainDb?: (number|null); + /** RestoreAgentRequest agentContent */ + agentContent?: (Uint8Array|string|null); - /** SynthesizeSpeechConfig effectsProfileId */ - effectsProfileId?: (string[]|null); + /** RestoreAgentRequest gitSource */ + gitSource?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null); - /** SynthesizeSpeechConfig voice */ - voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** RestoreAgentRequest restoreOption */ + restoreOption?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|null); } - /** Represents a SynthesizeSpeechConfig. */ - class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { + /** Represents a RestoreAgentRequest. */ + class RestoreAgentRequest implements IRestoreAgentRequest { /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new RestoreAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest); - /** SynthesizeSpeechConfig speakingRate. */ - public speakingRate: number; + /** RestoreAgentRequest name. */ + public name: string; - /** SynthesizeSpeechConfig pitch. */ - public pitch: number; + /** RestoreAgentRequest agentUri. */ + public agentUri?: (string|null); - /** SynthesizeSpeechConfig volumeGainDb. */ - public volumeGainDb: number; + /** RestoreAgentRequest agentContent. */ + public agentContent?: (Uint8Array|string|null); - /** SynthesizeSpeechConfig effectsProfileId. */ - public effectsProfileId: string[]; + /** RestoreAgentRequest gitSource. */ + public gitSource?: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null); - /** SynthesizeSpeechConfig voice. */ - public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); + /** RestoreAgentRequest restoreOption. */ + public restoreOption: (google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption); + + /** RestoreAgentRequest agent. */ + public agent?: ("agentUri"|"agentContent"|"gitSource"); /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new RestoreAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SynthesizeSpeechConfig instance + * @returns RestoreAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * @param message RestoreAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * @param message RestoreAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a RestoreAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SynthesizeSpeechConfig + * @returns RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SynthesizeSpeechConfig + * @returns RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a RestoreAgentRequest 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 SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SynthesizeSpeechConfig + * @returns RestoreAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. - * @param message SynthesizeSpeechConfig + * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. + * @param message RestoreAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this RestoreAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for RestoreAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** OutputAudioEncoding enum. */ - enum OutputAudioEncoding { - OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, - OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, - OUTPUT_AUDIO_ENCODING_MP3 = 2, - OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, - OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, - OUTPUT_AUDIO_ENCODING_MULAW = 5 - } + namespace RestoreAgentRequest { - /** Properties of an OutputAudioConfig. */ - interface IOutputAudioConfig { + /** Properties of a GitSource. */ + interface IGitSource { - /** OutputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); + /** GitSource trackingBranch */ + trackingBranch?: (string|null); + } - /** OutputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** Represents a GitSource. */ + class GitSource implements IGitSource { - /** OutputAudioConfig synthesizeSpeechConfig */ - synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** + * Constructs a new GitSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource); + + /** GitSource trackingBranch. */ + public trackingBranch: string; + + /** + * Creates a new GitSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GitSource instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + + /** + * Verifies a GitSource 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 GitSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @param message GitSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RestoreOption enum. */ + enum RestoreOption { + RESTORE_OPTION_UNSPECIFIED = 0, + KEEP = 1, + FALLBACK = 2 + } } - /** Represents an OutputAudioConfig. */ - class OutputAudioConfig implements IOutputAudioConfig { + /** Properties of a ValidateAgentRequest. */ + interface IValidateAgentRequest { + + /** ValidateAgentRequest name */ + name?: (string|null); + + /** ValidateAgentRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a ValidateAgentRequest. */ + class ValidateAgentRequest implements IValidateAgentRequest { /** - * Constructs a new OutputAudioConfig. + * Constructs a new ValidateAgentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - - /** OutputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest); - /** OutputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** ValidateAgentRequest name. */ + public name: string; - /** OutputAudioConfig synthesizeSpeechConfig. */ - public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); + /** ValidateAgentRequest languageCode. */ + public languageCode: string; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new ValidateAgentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudioConfig instance + * @returns ValidateAgentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ValidateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. + * @param message ValidateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ValidateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. + * @param message ValidateAgentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a ValidateAgentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudioConfig + * @returns ValidateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ValidateAgentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioConfig + * @returns ValidateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; /** - * Verifies an OutputAudioConfig message. + * Verifies a ValidateAgentRequest 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 OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateAgentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioConfig + * @returns ValidateAgentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. - * @param message OutputAudioConfig + * Creates a plain object from a ValidateAgentRequest message. Also converts values to other types if specified. + * @param message ValidateAgentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this ValidateAgentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for ValidateAgentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TextToSpeechSettings. */ - interface ITextToSpeechSettings { + /** Properties of a GetAgentValidationResultRequest. */ + interface IGetAgentValidationResultRequest { - /** TextToSpeechSettings synthesizeSpeechConfigs */ - synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }|null); + /** GetAgentValidationResultRequest name */ + name?: (string|null); + + /** GetAgentValidationResultRequest languageCode */ + languageCode?: (string|null); } - /** Represents a TextToSpeechSettings. */ - class TextToSpeechSettings implements ITextToSpeechSettings { + /** Represents a GetAgentValidationResultRequest. */ + class GetAgentValidationResultRequest implements IGetAgentValidationResultRequest { /** - * Constructs a new TextToSpeechSettings. + * Constructs a new GetAgentValidationResultRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest); - /** TextToSpeechSettings synthesizeSpeechConfigs. */ - public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }; + /** GetAgentValidationResultRequest name. */ + public name: string; + + /** GetAgentValidationResultRequest languageCode. */ + public languageCode: string; /** - * Creates a new TextToSpeechSettings instance using the specified properties. + * Creates a new GetAgentValidationResultRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TextToSpeechSettings instance + * @returns GetAgentValidationResultRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; /** - * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. - * @param message TextToSpeechSettings message or plain object to encode + * Encodes the specified GetAgentValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. + * @param message GetAgentValidationResultRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. - * @param message TextToSpeechSettings message or plain object to encode + * Encodes the specified GetAgentValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. + * @param message GetAgentValidationResultRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer. + * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextToSpeechSettings + * @returns GetAgentValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. + * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextToSpeechSettings + * @returns GetAgentValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; /** - * Verifies a TextToSpeechSettings message. + * Verifies a GetAgentValidationResultRequest 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 TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetAgentValidationResultRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextToSpeechSettings + * @returns GetAgentValidationResultRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest; /** - * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. - * @param message TextToSpeechSettings + * Creates a plain object from a GetAgentValidationResultRequest message. Also converts values to other types if specified. + * @param message GetAgentValidationResultRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextToSpeechSettings to JSON. + * Converts this GetAgentValidationResultRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TextToSpeechSettings + * Gets the default type url for GetAgentValidationResultRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Flows */ - class Flows extends $protobuf.rpc.Service { + /** Properties of an AgentValidationResult. */ + interface IAgentValidationResult { + + /** AgentValidationResult name */ + name?: (string|null); + + /** AgentValidationResult flowValidationResults */ + flowValidationResults?: (google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult[]|null); + } + + /** Represents an AgentValidationResult. */ + class AgentValidationResult implements IAgentValidationResult { /** - * Constructs a new Flows service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new AgentValidationResult. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult); + + /** AgentValidationResult name. */ + public name: string; + + /** AgentValidationResult flowValidationResults. */ + public flowValidationResults: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult[]; /** - * Creates new Flows 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 AgentValidationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentValidationResult instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Flows; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow + * Encodes the specified AgentValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. + * @param message AgentValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateFlow. - * @param request CreateFlowRequest message or plain object - * @returns Promise + * Encodes the specified AgentValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. + * @param message AgentValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes an AgentValidationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; /** - * Calls DeleteFlow. - * @param request DeleteFlowRequest message or plain object - * @returns Promise + * Decodes an AgentValidationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFlowsResponse + * Verifies an AgentValidationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListFlows. - * @param request ListFlowsRequest message or plain object - * @returns Promise + * Creates an AgentValidationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentValidationResult */ - public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AgentValidationResult; /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow + * Creates a plain object from an AgentValidationResult message. Also converts values to other types if specified. + * @param message AgentValidationResult + * @param [options] Conversion options + * @returns Plain object */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetFlow. - * @param request GetFlowRequest message or plain object - * @returns Promise + * Converts this AgentValidationResult to JSON. + * @returns JSON object */ - public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Flow + * Gets the default type url for AgentValidationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetGenerativeSettingsRequest. */ + interface IGetGenerativeSettingsRequest { + + /** GetGenerativeSettingsRequest name */ + name?: (string|null); + + /** GetGenerativeSettingsRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a GetGenerativeSettingsRequest. */ + class GetGenerativeSettingsRequest implements IGetGenerativeSettingsRequest { /** - * Calls UpdateFlow. - * @param request UpdateFlowRequest message or plain object - * @returns Promise + * Constructs a new GetGenerativeSettingsRequest. + * @param [properties] Properties to set */ - public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest); + + /** GetGenerativeSettingsRequest name. */ + public name: string; + + /** GetGenerativeSettingsRequest languageCode. */ + public languageCode: string; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new GetGenerativeSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGenerativeSettingsRequest instance */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; /** - * Calls TrainFlow. - * @param request TrainFlowRequest message or plain object - * @returns Promise + * Encodes the specified GetGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. + * @param message GetGenerativeSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Encodes the specified GetGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. + * @param message GetGenerativeSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ValidateFlow. - * @param request ValidateFlowRequest message or plain object - * @returns Promise + * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FlowValidationResult + * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; /** - * Calls GetFlowValidationResult. - * @param request GetFlowValidationResultRequest message or plain object - * @returns Promise + * Verifies a GetGenerativeSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a GetGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGenerativeSettingsRequest */ - public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest; /** - * Calls ImportFlow. - * @param request ImportFlowRequest message or plain object - * @returns Promise + * Creates a plain object from a GetGenerativeSettingsRequest message. Also converts values to other types if specified. + * @param message GetGenerativeSettingsRequest + * @param [options] Conversion options + * @returns Plain object */ - public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this GetGenerativeSettingsRequest to JSON. + * @returns JSON object */ - public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ExportFlow. - * @param request ExportFlowRequest message or plain object - * @returns Promise + * Gets the default type url for GetGenerativeSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Flows { + /** Properties of an UpdateGenerativeSettingsRequest. */ + interface IUpdateGenerativeSettingsRequest { + + /** UpdateGenerativeSettingsRequest generativeSettings */ + generativeSettings?: (google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null); + + /** UpdateGenerativeSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGenerativeSettingsRequest. */ + class UpdateGenerativeSettingsRequest implements IUpdateGenerativeSettingsRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. - * @param error Error, if any - * @param [response] Flow + * Constructs a new UpdateGenerativeSettingsRequest. + * @param [properties] Properties to set */ - type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest); + + /** UpdateGenerativeSettingsRequest generativeSettings. */ + public generativeSettings?: (google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null); + + /** UpdateGenerativeSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. - * @param error Error, if any - * @param [response] Empty + * Creates a new UpdateGenerativeSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGenerativeSettingsRequest instance */ - type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. - * @param error Error, if any - * @param [response] ListFlowsResponse + * Encodes the specified UpdateGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * @param message UpdateGenerativeSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. - * @param error Error, if any - * @param [response] Flow + * Encodes the specified UpdateGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * @param message UpdateGenerativeSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. - * @param error Error, if any - * @param [response] Flow + * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. - * @param error Error, if any - * @param [response] Operation + * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Verifies an UpdateGenerativeSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. - * @param error Error, if any - * @param [response] FlowValidationResult + * Creates an UpdateGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGenerativeSettingsRequest */ - type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from an UpdateGenerativeSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateGenerativeSettingsRequest + * @param [options] Conversion options + * @returns Plain object */ - type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. - * @param error Error, if any - * @param [response] Operation + * Converts this UpdateGenerativeSettingsRequest to JSON. + * @returns JSON object */ - type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGenerativeSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NluSettings. */ - interface INluSettings { + /** AudioEncoding enum. */ + enum AudioEncoding { + AUDIO_ENCODING_UNSPECIFIED = 0, + AUDIO_ENCODING_LINEAR_16 = 1, + AUDIO_ENCODING_FLAC = 2, + AUDIO_ENCODING_MULAW = 3, + AUDIO_ENCODING_AMR = 4, + AUDIO_ENCODING_AMR_WB = 5, + AUDIO_ENCODING_OGG_OPUS = 6, + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + } - /** NluSettings modelType */ - modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); + /** SpeechModelVariant enum. */ + enum SpeechModelVariant { + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, + USE_BEST_AVAILABLE = 1, + USE_STANDARD = 2, + USE_ENHANCED = 3 + } - /** NluSettings classificationThreshold */ - classificationThreshold?: (number|null); + /** Properties of a SpeechWordInfo. */ + interface ISpeechWordInfo { - /** NluSettings modelTrainingMode */ - modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); + /** SpeechWordInfo word */ + word?: (string|null); + + /** SpeechWordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo confidence */ + confidence?: (number|null); } - /** Represents a NluSettings. */ - class NluSettings implements INluSettings { + /** Represents a SpeechWordInfo. */ + class SpeechWordInfo implements ISpeechWordInfo { /** - * Constructs a new NluSettings. + * Constructs a new SpeechWordInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo); - /** NluSettings modelType. */ - public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); + /** SpeechWordInfo word. */ + public word: string; - /** NluSettings classificationThreshold. */ - public classificationThreshold: number; + /** SpeechWordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); - /** NluSettings modelTrainingMode. */ - public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); + /** SpeechWordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** SpeechWordInfo confidence. */ + public confidence: number; /** - * Creates a new NluSettings instance using the specified properties. + * Creates a new SpeechWordInfo instance using the specified properties. * @param [properties] Properties to set - * @returns NluSettings instance + * @returns SpeechWordInfo instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. - * @param message NluSettings message or plain object to encode + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a SpeechWordInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NluSettings + * @returns SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NluSettings + * @returns SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Verifies a NluSettings message. + * Verifies a SpeechWordInfo 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 NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NluSettings + * @returns SpeechWordInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. - * @param message NluSettings + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * @param message SpeechWordInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NluSettings to JSON. + * Converts this SpeechWordInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NluSettings + * Gets the default type url for SpeechWordInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NluSettings { + /** Properties of a BargeInConfig. */ + interface IBargeInConfig { - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - MODEL_TYPE_STANDARD = 1, - MODEL_TYPE_ADVANCED = 3 - } + /** BargeInConfig noBargeInDuration */ + noBargeInDuration?: (google.protobuf.IDuration|null); - /** ModelTrainingMode enum. */ - enum ModelTrainingMode { - MODEL_TRAINING_MODE_UNSPECIFIED = 0, - MODEL_TRAINING_MODE_AUTOMATIC = 1, - MODEL_TRAINING_MODE_MANUAL = 2 - } + /** BargeInConfig totalDuration */ + totalDuration?: (google.protobuf.IDuration|null); } - /** Properties of a Flow. */ - interface IFlow { + /** Represents a BargeInConfig. */ + class BargeInConfig implements IBargeInConfig { - /** Flow name */ - name?: (string|null); + /** + * Constructs a new BargeInConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IBargeInConfig); - /** Flow displayName */ - displayName?: (string|null); - - /** Flow description */ - description?: (string|null); - - /** Flow transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); - - /** Flow eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); - - /** Flow transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); - - /** Flow nluSettings */ - nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); - - /** Flow advancedSettings */ - advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - - /** Flow knowledgeConnectorSettings */ - knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); - } - - /** Represents a Flow. */ - class Flow implements IFlow { - - /** - * Constructs a new Flow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); + /** BargeInConfig noBargeInDuration. */ + public noBargeInDuration?: (google.protobuf.IDuration|null); - /** Flow name. */ - public name: string; - - /** Flow displayName. */ - public displayName: string; - - /** Flow description. */ - public description: string; - - /** Flow transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; - - /** Flow eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - - /** Flow transitionRouteGroups. */ - public transitionRouteGroups: string[]; - - /** Flow nluSettings. */ - public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); - - /** Flow advancedSettings. */ - public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - - /** Flow knowledgeConnectorSettings. */ - public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); + /** BargeInConfig totalDuration. */ + public totalDuration?: (google.protobuf.IDuration|null); /** - * Creates a new Flow instance using the specified properties. + * Creates a new BargeInConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Flow instance + * @returns BargeInConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IBargeInConfig): google.cloud.dialogflow.cx.v3beta1.BargeInConfig; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. - * @param message Flow message or plain object to encode + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BargeInConfig.verify|verify} messages. + * @param message BargeInConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IBargeInConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes a BargeInConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Flow + * @returns BargeInConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.BargeInConfig; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Flow + * @returns BargeInConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.BargeInConfig; /** - * Verifies a Flow message. + * Verifies a BargeInConfig 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 Flow message from a plain object. Also converts values to their respective internal types. + * Creates a BargeInConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Flow + * @returns BargeInConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.BargeInConfig; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. - * @param message Flow + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. + * @param message BargeInConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.BargeInConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Flow to JSON. + * Converts this BargeInConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Flow + * Gets the default type url for BargeInConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFlowRequest. */ - interface ICreateFlowRequest { + /** Properties of an InputAudioConfig. */ + interface IInputAudioConfig { - /** CreateFlowRequest parent */ - parent?: (string|null); + /** InputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null); - /** CreateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** InputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); - /** CreateFlowRequest languageCode */ - languageCode?: (string|null); + /** InputAudioConfig enableWordInfo */ + enableWordInfo?: (boolean|null); + + /** InputAudioConfig phraseHints */ + phraseHints?: (string[]|null); + + /** InputAudioConfig model */ + model?: (string|null); + + /** InputAudioConfig modelVariant */ + modelVariant?: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null); + + /** InputAudioConfig singleUtterance */ + singleUtterance?: (boolean|null); + + /** InputAudioConfig bargeInConfig */ + bargeInConfig?: (google.cloud.dialogflow.cx.v3beta1.IBargeInConfig|null); } - /** Represents a CreateFlowRequest. */ - class CreateFlowRequest implements ICreateFlowRequest { + /** Represents an InputAudioConfig. */ + class InputAudioConfig implements IInputAudioConfig { /** - * Constructs a new CreateFlowRequest. + * Constructs a new InputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig); - /** CreateFlowRequest parent. */ - public parent: string; + /** InputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.AudioEncoding); - /** CreateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** InputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; - /** CreateFlowRequest languageCode. */ - public languageCode: string; + /** InputAudioConfig enableWordInfo. */ + public enableWordInfo: boolean; + + /** InputAudioConfig phraseHints. */ + public phraseHints: string[]; + + /** InputAudioConfig model. */ + public model: string; + + /** InputAudioConfig modelVariant. */ + public modelVariant: (google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant); + + /** InputAudioConfig singleUtterance. */ + public singleUtterance: boolean; + + /** InputAudioConfig bargeInConfig. */ + public bargeInConfig?: (google.cloud.dialogflow.cx.v3beta1.IBargeInConfig|null); /** - * Creates a new CreateFlowRequest instance using the specified properties. + * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFlowRequest instance + * @returns InputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. - * @param message CreateFlowRequest message or plain object to encode + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * @param message InputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFlowRequest + * @returns InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFlowRequest + * @returns InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Verifies a CreateFlowRequest message. + * Verifies an InputAudioConfig 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 CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFlowRequest + * @returns InputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.InputAudioConfig; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. - * @param message CreateFlowRequest + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * @param message InputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this InputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for InputAudioConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFlowRequest. */ - interface IDeleteFlowRequest { + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } - /** DeleteFlowRequest name */ + /** Properties of a VoiceSelectionParams. */ + interface IVoiceSelectionParams { + + /** VoiceSelectionParams name */ name?: (string|null); - /** DeleteFlowRequest force */ - force?: (boolean|null); + /** VoiceSelectionParams ssmlGender */ + ssmlGender?: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null); } - /** Represents a DeleteFlowRequest. */ - class DeleteFlowRequest implements IDeleteFlowRequest { + /** Represents a VoiceSelectionParams. */ + class VoiceSelectionParams implements IVoiceSelectionParams { /** - * Constructs a new DeleteFlowRequest. + * Constructs a new VoiceSelectionParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams); - /** DeleteFlowRequest name. */ + /** VoiceSelectionParams name. */ public name: string; - /** DeleteFlowRequest force. */ - public force: boolean; + /** VoiceSelectionParams ssmlGender. */ + public ssmlGender: (google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender); /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFlowRequest instance + * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. - * @param message DeleteFlowRequest message or plain object to encode + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * @param message VoiceSelectionParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFlowRequest + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFlowRequest + * @returns VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Verifies a DeleteFlowRequest message. + * Verifies a VoiceSelectionParams 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 DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFlowRequest + * @returns VoiceSelectionParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. - * @param message DeleteFlowRequest + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * @param message VoiceSelectionParams * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this VoiceSelectionParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for VoiceSelectionParams * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFlowsRequest. */ - interface IListFlowsRequest { + /** Properties of a SynthesizeSpeechConfig. */ + interface ISynthesizeSpeechConfig { - /** ListFlowsRequest parent */ - parent?: (string|null); + /** SynthesizeSpeechConfig speakingRate */ + speakingRate?: (number|null); - /** ListFlowsRequest pageSize */ - pageSize?: (number|null); + /** SynthesizeSpeechConfig pitch */ + pitch?: (number|null); - /** ListFlowsRequest pageToken */ - pageToken?: (string|null); + /** SynthesizeSpeechConfig volumeGainDb */ + volumeGainDb?: (number|null); - /** ListFlowsRequest languageCode */ - languageCode?: (string|null); + /** SynthesizeSpeechConfig effectsProfileId */ + effectsProfileId?: (string[]|null); + + /** SynthesizeSpeechConfig voice */ + voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); } - /** Represents a ListFlowsRequest. */ - class ListFlowsRequest implements IListFlowsRequest { + /** Represents a SynthesizeSpeechConfig. */ + class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { /** - * Constructs a new ListFlowsRequest. + * Constructs a new SynthesizeSpeechConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig); - /** ListFlowsRequest parent. */ - public parent: string; + /** SynthesizeSpeechConfig speakingRate. */ + public speakingRate: number; - /** ListFlowsRequest pageSize. */ - public pageSize: number; + /** SynthesizeSpeechConfig pitch. */ + public pitch: number; - /** ListFlowsRequest pageToken. */ - public pageToken: string; + /** SynthesizeSpeechConfig volumeGainDb. */ + public volumeGainDb: number; - /** ListFlowsRequest languageCode. */ - public languageCode: string; + /** SynthesizeSpeechConfig effectsProfileId. */ + public effectsProfileId: string[]; + + /** SynthesizeSpeechConfig voice. */ + public voice?: (google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null); /** - * Creates a new ListFlowsRequest instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListFlowsRequest instance + * @returns SynthesizeSpeechConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. - * @param message ListFlowsRequest message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * @param message SynthesizeSpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFlowsRequest + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFlowsRequest + * @returns SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Verifies a ListFlowsRequest message. + * Verifies a SynthesizeSpeechConfig 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 ListFlowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFlowsRequest + * @returns SynthesizeSpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. - * @param message ListFlowsRequest + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * @param message SynthesizeSpeechConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFlowsRequest to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFlowsRequest + * Gets the default type url for SynthesizeSpeechConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFlowsResponse. */ - interface IListFlowsResponse { + /** OutputAudioEncoding enum. */ + enum OutputAudioEncoding { + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0, + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1, + OUTPUT_AUDIO_ENCODING_MP3 = 2, + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4, + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3, + OUTPUT_AUDIO_ENCODING_MULAW = 5 + } - /** ListFlowsResponse flows */ - flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); + /** Properties of an OutputAudioConfig. */ + interface IOutputAudioConfig { - /** ListFlowsResponse nextPageToken */ - nextPageToken?: (string|null); + /** OutputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null); + + /** OutputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** OutputAudioConfig synthesizeSpeechConfig */ + synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); } - /** Represents a ListFlowsResponse. */ - class ListFlowsResponse implements IListFlowsResponse { + /** Represents an OutputAudioConfig. */ + class OutputAudioConfig implements IOutputAudioConfig { /** - * Constructs a new ListFlowsResponse. + * Constructs a new OutputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig); - /** ListFlowsResponse flows. */ - public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; + /** OutputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding); - /** ListFlowsResponse nextPageToken. */ - public nextPageToken: string; + /** OutputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; + + /** OutputAudioConfig synthesizeSpeechConfig. */ + public synthesizeSpeechConfig?: (google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null); /** - * Creates a new ListFlowsResponse instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListFlowsResponse instance + * @returns OutputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. - * @param message ListFlowsResponse message or plain object to encode + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * @param message OutputAudioConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFlowsResponse + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFlowsResponse + * @returns OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Verifies a ListFlowsResponse message. + * Verifies an OutputAudioConfig 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 ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFlowsResponse + * @returns OutputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. - * @param message ListFlowsResponse + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * @param message OutputAudioConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this OutputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFlowsResponse + * Gets the default type url for OutputAudioConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFlowRequest. */ - interface IGetFlowRequest { - - /** GetFlowRequest name */ - name?: (string|null); + /** Properties of a TextToSpeechSettings. */ + interface ITextToSpeechSettings { - /** GetFlowRequest languageCode */ - languageCode?: (string|null); + /** TextToSpeechSettings synthesizeSpeechConfigs */ + synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }|null); } - /** Represents a GetFlowRequest. */ - class GetFlowRequest implements IGetFlowRequest { + /** Represents a TextToSpeechSettings. */ + class TextToSpeechSettings implements ITextToSpeechSettings { /** - * Constructs a new GetFlowRequest. + * Constructs a new TextToSpeechSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); - - /** GetFlowRequest name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings); - /** GetFlowRequest languageCode. */ - public languageCode: string; + /** TextToSpeechSettings synthesizeSpeechConfigs. */ + public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig }; /** - * Creates a new GetFlowRequest instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GetFlowRequest instance + * @returns TextToSpeechSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. - * @param message GetFlowRequest message or plain object to encode + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFlowRequest + * @returns TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Verifies a GetFlowRequest message. + * Verifies a TextToSpeechSettings 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 GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFlowRequest + * @returns TextToSpeechSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. - * @param message GetFlowRequest + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * @param message TextToSpeechSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFlowRequest to JSON. + * Converts this TextToSpeechSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFlowRequest + * Gets the default type url for TextToSpeechSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateFlowRequest. */ - interface IUpdateFlowRequest { + /** Represents a Flows */ + class Flows extends $protobuf.rpc.Service { - /** UpdateFlowRequest flow */ - flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** + * Constructs a new Flows 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); - /** UpdateFlowRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** + * Creates new Flows 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): Flows; - /** UpdateFlowRequest languageCode */ - languageCode?: (string|null); - } + /** + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow + */ + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback): void; - /** Represents an UpdateFlowRequest. */ - class UpdateFlowRequest implements IUpdateFlowRequest { + /** + * Calls CreateFlow. + * @param request CreateFlowRequest message or plain object + * @returns Promise + */ + public createFlow(request: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): Promise; /** - * Constructs a new UpdateFlowRequest. - * @param [properties] Properties to set + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback): void; - /** UpdateFlowRequest flow. */ - public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); + /** + * Calls DeleteFlow. + * @param request DeleteFlowRequest message or plain object + * @returns Promise + */ + public deleteFlow(request: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): Promise; - /** UpdateFlowRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFlowsResponse + */ + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback): void; - /** UpdateFlowRequest languageCode. */ - public languageCode: string; + /** + * Calls ListFlows. + * @param request ListFlowsRequest message or plain object + * @returns Promise + */ + public listFlows(request: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): Promise; /** - * Creates a new UpdateFlowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFlowRequest instance + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback): void; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetFlow. + * @param request GetFlowRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getFlow(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): Promise; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. - * @param message UpdateFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Flow */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback): void; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateFlow. + * @param request UpdateFlowRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public updateFlow(request: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): Promise; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFlowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback): void; /** - * Verifies an UpdateFlowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls TrainFlow. + * @param request TrainFlowRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public trainFlow(request: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): Promise; /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFlowRequest + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; + public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback): void; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. - * @param message UpdateFlowRequest - * @param [options] Conversion options - * @returns Plain object + * Calls ValidateFlow. + * @param request ValidateFlowRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public validateFlow(request: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): Promise; /** - * Converts this UpdateFlowRequest to JSON. - * @returns JSON object + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FlowValidationResult */ - public toJSON(): { [k: string]: any }; + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback): void; /** - * Gets the default type url for UpdateFlowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetFlowValidationResult. + * @param request GetFlowValidationResultRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getFlowValidationResult(request: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): Promise; - /** Properties of a TrainFlowRequest. */ - interface ITrainFlowRequest { + /** + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback): void; - /** TrainFlowRequest name */ - name?: (string|null); - } + /** + * Calls ImportFlow. + * @param request ImportFlowRequest message or plain object + * @returns Promise + */ + public importFlow(request: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): Promise; - /** Represents a TrainFlowRequest. */ - class TrainFlowRequest implements ITrainFlowRequest { + /** + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, callback: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback): void; /** - * Constructs a new TrainFlowRequest. - * @param [properties] Properties to set + * Calls ExportFlow. + * @param request ExportFlowRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); + public exportFlow(request: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): Promise; + } - /** TrainFlowRequest name. */ - public name: string; + namespace Flows { /** - * Creates a new TrainFlowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TrainFlowRequest instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + type CreateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. + * @param error Error, if any + * @param [response] Empty */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type DeleteFlowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. - * @param message TrainFlowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. + * @param error Error, if any + * @param [response] ListFlowsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type ListFlowsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) => void; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TrainFlowRequest - * @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.v3beta1.Flows|getFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + type GetFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TrainFlowRequest - * @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.v3beta1.Flows|updateFlow}. + * @param error Error, if any + * @param [response] Flow */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + type UpdateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Flow) => void; /** - * Verifies a TrainFlowRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type TrainFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TrainFlowRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; + type ValidateFlowCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. - * @param message TrainFlowRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. + * @param error Error, if any + * @param [response] FlowValidationResult */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetFlowValidationResultCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) => void; /** - * Converts this TrainFlowRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type ImportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for TrainFlowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ExportFlowCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of a ValidateFlowRequest. */ - interface IValidateFlowRequest { + /** Properties of a NluSettings. */ + interface INluSettings { - /** ValidateFlowRequest name */ - name?: (string|null); + /** NluSettings modelType */ + modelType?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null); - /** ValidateFlowRequest languageCode */ - languageCode?: (string|null); + /** NluSettings classificationThreshold */ + classificationThreshold?: (number|null); + + /** NluSettings modelTrainingMode */ + modelTrainingMode?: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null); } - /** Represents a ValidateFlowRequest. */ - class ValidateFlowRequest implements IValidateFlowRequest { + /** Represents a NluSettings. */ + class NluSettings implements INluSettings { /** - * Constructs a new ValidateFlowRequest. + * Constructs a new NluSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings); - /** ValidateFlowRequest name. */ - public name: string; + /** NluSettings modelType. */ + public modelType: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType); - /** ValidateFlowRequest languageCode. */ - public languageCode: string; + /** NluSettings classificationThreshold. */ + public classificationThreshold: number; + + /** NluSettings modelTrainingMode. */ + public modelTrainingMode: (google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|keyof typeof google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode); /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new NluSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ValidateFlowRequest instance + * @returns NluSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.INluSettings): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. - * @param message ValidateFlowRequest message or plain object to encode + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * @param message NluSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.INluSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidateFlowRequest + * @returns NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Verifies a ValidateFlowRequest message. + * Verifies a NluSettings 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 ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidateFlowRequest + * @returns NluSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.NluSettings; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. - * @param message ValidateFlowRequest + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * @param message NluSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.NluSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this NluSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for NluSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFlowValidationResultRequest. */ - interface IGetFlowValidationResultRequest { + namespace NluSettings { - /** GetFlowValidationResultRequest name */ + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + MODEL_TYPE_STANDARD = 1, + MODEL_TYPE_ADVANCED = 3 + } + + /** ModelTrainingMode enum. */ + enum ModelTrainingMode { + MODEL_TRAINING_MODE_UNSPECIFIED = 0, + MODEL_TRAINING_MODE_AUTOMATIC = 1, + MODEL_TRAINING_MODE_MANUAL = 2 + } + } + + /** Properties of a Flow. */ + interface IFlow { + + /** Flow name */ name?: (string|null); - /** GetFlowValidationResultRequest languageCode */ - languageCode?: (string|null); + /** Flow displayName */ + displayName?: (string|null); + + /** Flow description */ + description?: (string|null); + + /** Flow transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Flow eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + + /** Flow transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Flow nluSettings */ + nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + + /** Flow advancedSettings */ + advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Flow knowledgeConnectorSettings */ + knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); } - /** Represents a GetFlowValidationResultRequest. */ - class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { + /** Represents a Flow. */ + class Flow implements IFlow { /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new Flow. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow); - /** GetFlowValidationResultRequest name. */ + /** Flow name. */ public name: string; - /** GetFlowValidationResultRequest languageCode. */ - public languageCode: string; + /** Flow displayName. */ + public displayName: string; + + /** Flow description. */ + public description: string; + + /** Flow transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + + /** Flow eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** Flow transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Flow nluSettings. */ + public nluSettings?: (google.cloud.dialogflow.cx.v3beta1.INluSettings|null); + + /** Flow advancedSettings. */ + public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Flow knowledgeConnectorSettings. */ + public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new Flow instance using the specified properties. * @param [properties] Properties to set - * @returns GetFlowValidationResultRequest instance + * @returns Flow instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlow): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. - * @param message GetFlowValidationResultRequest message or plain object to encode + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * @param message Flow message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlow, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFlowValidationResultRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFlowValidationResultRequest + * @returns Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a Flow 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 GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFlowValidationResultRequest + * @returns Flow */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Flow; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. - * @param message GetFlowValidationResultRequest - * @param [options] Conversion options + * Creates a plain object from a Flow message. Also converts values to other types if specified. + * @param message Flow + * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Flow, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this Flow to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for Flow * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FlowValidationResult. */ - interface IFlowValidationResult { + /** Properties of a CreateFlowRequest. */ + interface ICreateFlowRequest { - /** FlowValidationResult name */ - name?: (string|null); + /** CreateFlowRequest parent */ + parent?: (string|null); - /** FlowValidationResult validationMessages */ - validationMessages?: (google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]|null); + /** CreateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** FlowValidationResult updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** CreateFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents a FlowValidationResult. */ - class FlowValidationResult implements IFlowValidationResult { + /** Represents a CreateFlowRequest. */ + class CreateFlowRequest implements ICreateFlowRequest { /** - * Constructs a new FlowValidationResult. + * Constructs a new CreateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest); - /** FlowValidationResult name. */ - public name: string; + /** CreateFlowRequest parent. */ + public parent: string; - /** FlowValidationResult validationMessages. */ - public validationMessages: google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]; + /** CreateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** FlowValidationResult updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** CreateFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new FlowValidationResult instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FlowValidationResult instance + * @returns CreateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. - * @param message FlowValidationResult message or plain object to encode + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * @param message CreateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FlowValidationResult + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FlowValidationResult + * @returns CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Verifies a FlowValidationResult message. + * Verifies a CreateFlowRequest 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 FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FlowValidationResult + * @returns CreateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest; /** - * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. - * @param message FlowValidationResult + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * @param message CreateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FlowValidationResult to JSON. + * Converts this CreateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for CreateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportFlowRequest. */ - interface IImportFlowRequest { - - /** ImportFlowRequest parent */ - parent?: (string|null); - - /** ImportFlowRequest flowUri */ - flowUri?: (string|null); - - /** ImportFlowRequest flowContent */ - flowContent?: (Uint8Array|string|null); + /** Properties of a DeleteFlowRequest. */ + interface IDeleteFlowRequest { - /** ImportFlowRequest importOption */ - importOption?: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null); + /** DeleteFlowRequest name */ + name?: (string|null); - /** ImportFlowRequest flowImportStrategy */ - flowImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null); + /** DeleteFlowRequest force */ + force?: (boolean|null); } - /** Represents an ImportFlowRequest. */ - class ImportFlowRequest implements IImportFlowRequest { + /** Represents a DeleteFlowRequest. */ + class DeleteFlowRequest implements IDeleteFlowRequest { /** - * Constructs a new ImportFlowRequest. + * Constructs a new DeleteFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest); - - /** ImportFlowRequest parent. */ - public parent: string; - - /** ImportFlowRequest flowUri. */ - public flowUri?: (string|null); - - /** ImportFlowRequest flowContent. */ - public flowContent?: (Uint8Array|string|null); - - /** ImportFlowRequest importOption. */ - public importOption: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest); - /** ImportFlowRequest flowImportStrategy. */ - public flowImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null); + /** DeleteFlowRequest name. */ + public name: string; - /** ImportFlowRequest flow. */ - public flow?: ("flowUri"|"flowContent"); + /** DeleteFlowRequest force. */ + public force: boolean; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowRequest instance + * @returns DeleteFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. - * @param message ImportFlowRequest message or plain object to encode + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * @param message DeleteFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowRequest + * @returns DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Verifies an ImportFlowRequest message. + * Verifies a DeleteFlowRequest 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 ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowRequest + * @returns DeleteFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. - * @param message ImportFlowRequest + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * @param message DeleteFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for DeleteFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportFlowRequest { + /** Properties of a ListFlowsRequest. */ + interface IListFlowsRequest { - /** ImportOption enum. */ - enum ImportOption { - IMPORT_OPTION_UNSPECIFIED = 0, - KEEP = 1, - FALLBACK = 2 - } - } + /** ListFlowsRequest parent */ + parent?: (string|null); - /** Properties of a FlowImportStrategy. */ - interface IFlowImportStrategy { + /** ListFlowsRequest pageSize */ + pageSize?: (number|null); - /** FlowImportStrategy globalImportStrategy */ - globalImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportStrategy|null); + /** ListFlowsRequest pageToken */ + pageToken?: (string|null); + + /** ListFlowsRequest languageCode */ + languageCode?: (string|null); } - /** Represents a FlowImportStrategy. */ - class FlowImportStrategy implements IFlowImportStrategy { + /** Represents a ListFlowsRequest. */ + class ListFlowsRequest implements IListFlowsRequest { /** - * Constructs a new FlowImportStrategy. + * Constructs a new ListFlowsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest); - /** FlowImportStrategy globalImportStrategy. */ - public globalImportStrategy: (google.cloud.dialogflow.cx.v3beta1.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportStrategy); + /** ListFlowsRequest parent. */ + public parent: string; + + /** ListFlowsRequest pageSize. */ + public pageSize: number; + + /** ListFlowsRequest pageToken. */ + public pageToken: string; + + /** ListFlowsRequest languageCode. */ + public languageCode: string; /** - * Creates a new FlowImportStrategy instance using the specified properties. + * Creates a new ListFlowsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FlowImportStrategy instance + * @returns ListFlowsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Encodes the specified FlowImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. - * @param message FlowImportStrategy message or plain object to encode + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FlowImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. - * @param message FlowImportStrategy message or plain object to encode + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * @param message ListFlowsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FlowImportStrategy message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FlowImportStrategy + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Decodes a FlowImportStrategy message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FlowImportStrategy + * @returns ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Verifies a FlowImportStrategy message. + * Verifies a ListFlowsRequest 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 FlowImportStrategy message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FlowImportStrategy + * @returns ListFlowsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest; /** - * Creates a plain object from a FlowImportStrategy message. Also converts values to other types if specified. - * @param message FlowImportStrategy + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * @param message ListFlowsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FlowImportStrategy to JSON. + * Converts this ListFlowsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FlowImportStrategy + * Gets the default type url for ListFlowsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportFlowResponse. */ - interface IImportFlowResponse { + /** Properties of a ListFlowsResponse. */ + interface IListFlowsResponse { - /** ImportFlowResponse flow */ - flow?: (string|null); + /** ListFlowsResponse flows */ + flows?: (google.cloud.dialogflow.cx.v3beta1.IFlow[]|null); + + /** ListFlowsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an ImportFlowResponse. */ - class ImportFlowResponse implements IImportFlowResponse { + /** Represents a ListFlowsResponse. */ + class ListFlowsResponse implements IListFlowsResponse { /** - * Constructs a new ImportFlowResponse. + * Constructs a new ListFlowsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse); - /** ImportFlowResponse flow. */ - public flow: string; + /** ListFlowsResponse flows. */ + public flows: google.cloud.dialogflow.cx.v3beta1.IFlow[]; + + /** ListFlowsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportFlowResponse instance + * @returns ListFlowsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. - * @param message ImportFlowResponse message or plain object to encode + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * @param message ListFlowsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportFlowResponse + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportFlowResponse + * @returns ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Verifies an ImportFlowResponse message. + * Verifies a ListFlowsResponse 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 ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportFlowResponse + * @returns ListFlowsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse; /** - * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. - * @param message ImportFlowResponse + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * @param message ListFlowsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportFlowResponse to JSON. + * Converts this ListFlowsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for ListFlowsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowRequest. */ - interface IExportFlowRequest { + /** Properties of a GetFlowRequest. */ + interface IGetFlowRequest { - /** ExportFlowRequest name */ + /** GetFlowRequest name */ name?: (string|null); - /** ExportFlowRequest flowUri */ - flowUri?: (string|null); - - /** ExportFlowRequest includeReferencedFlows */ - includeReferencedFlows?: (boolean|null); + /** GetFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ExportFlowRequest. */ - class ExportFlowRequest implements IExportFlowRequest { + /** Represents a GetFlowRequest. */ + class GetFlowRequest implements IGetFlowRequest { /** - * Constructs a new ExportFlowRequest. + * Constructs a new GetFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest); - /** ExportFlowRequest name. */ + /** GetFlowRequest name. */ public name: string; - /** ExportFlowRequest flowUri. */ - public flowUri: string; - - /** ExportFlowRequest includeReferencedFlows. */ - public includeReferencedFlows: boolean; + /** GetFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new GetFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowRequest instance + * @returns GetFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. - * @param message ExportFlowRequest message or plain object to encode + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * @param message GetFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes a GetFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowRequest + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowRequest + * @returns GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Verifies an ExportFlowRequest message. + * Verifies a GetFlowRequest 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 ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowRequest + * @returns GetFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowRequest; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. - * @param message ExportFlowRequest + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * @param message GetFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this GetFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for GetFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExportFlowResponse. */ - interface IExportFlowResponse { + /** Properties of an UpdateFlowRequest. */ + interface IUpdateFlowRequest { - /** ExportFlowResponse flowUri */ - flowUri?: (string|null); + /** UpdateFlowRequest flow */ + flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** ExportFlowResponse flowContent */ - flowContent?: (Uint8Array|string|null); + /** UpdateFlowRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFlowRequest languageCode */ + languageCode?: (string|null); } - /** Represents an ExportFlowResponse. */ - class ExportFlowResponse implements IExportFlowResponse { + /** Represents an UpdateFlowRequest. */ + class UpdateFlowRequest implements IUpdateFlowRequest { /** - * Constructs a new ExportFlowResponse. + * Constructs a new UpdateFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest); - /** ExportFlowResponse flowUri. */ - public flowUri?: (string|null); + /** UpdateFlowRequest flow. */ + public flow?: (google.cloud.dialogflow.cx.v3beta1.IFlow|null); - /** ExportFlowResponse flowContent. */ - public flowContent?: (Uint8Array|string|null); + /** UpdateFlowRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ExportFlowResponse flow. */ - public flow?: ("flowUri"|"flowContent"); + /** UpdateFlowRequest languageCode. */ + public languageCode: string; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new UpdateFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ExportFlowResponse instance + * @returns UpdateFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. - * @param message ExportFlowResponse message or plain object to encode + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * @param message UpdateFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExportFlowResponse + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExportFlowResponse + * @returns UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Verifies an ExportFlowResponse message. + * Verifies an UpdateFlowRequest 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 ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExportFlowResponse + * @returns UpdateFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest; /** - * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. - * @param message ExportFlowResponse + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * @param message UpdateFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExportFlowResponse to JSON. + * Converts this UpdateFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for UpdateFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** ImportStrategy enum. */ - enum ImportStrategy { - IMPORT_STRATEGY_UNSPECIFIED = 0, - IMPORT_STRATEGY_CREATE_NEW = 1, - IMPORT_STRATEGY_REPLACE = 2, - IMPORT_STRATEGY_KEEP = 3, - IMPORT_STRATEGY_MERGE = 4, - IMPORT_STRATEGY_THROW_ERROR = 5 + /** Properties of a TrainFlowRequest. */ + interface ITrainFlowRequest { + + /** TrainFlowRequest name */ + name?: (string|null); } - /** Represents a Pages */ - class Pages extends $protobuf.rpc.Service { + /** Represents a TrainFlowRequest. */ + class TrainFlowRequest implements ITrainFlowRequest { /** - * Constructs a new Pages service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new TrainFlowRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest); - /** - * Creates new Pages 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): Pages; + /** TrainFlowRequest name. */ + public name: string; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPagesResponse + * Creates a new TrainFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TrainFlowRequest instance */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Calls ListPages. - * @param request ListPagesRequest message or plain object - * @returns Promise + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * @param message TrainFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetPage. - * @param request GetPageRequest message or plain object - * @returns Promise + * Decodes a TrainFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TrainFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TrainFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Calls CreatePage. - * @param request CreatePageRequest message or plain object - * @returns Promise + * Verifies a TrainFlowRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Page + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TrainFlowRequest */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest; /** - * Calls UpdatePage. - * @param request UpdatePageRequest message or plain object - * @returns Promise + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. + * @param message TrainFlowRequest + * @param [options] Conversion options + * @returns Plain object */ - public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this TrainFlowRequest to JSON. + * @returns JSON object */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeletePage. - * @param request DeletePageRequest message or plain object - * @returns Promise + * Gets the default type url for TrainFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Pages { + /** Properties of a ValidateFlowRequest. */ + interface IValidateFlowRequest { + + /** ValidateFlowRequest name */ + name?: (string|null); + + /** ValidateFlowRequest languageCode */ + languageCode?: (string|null); + } + + /** Represents a ValidateFlowRequest. */ + class ValidateFlowRequest implements IValidateFlowRequest { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. - * @param error Error, if any - * @param [response] ListPagesResponse + * Constructs a new ValidateFlowRequest. + * @param [properties] Properties to set */ - type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest); + + /** ValidateFlowRequest name. */ + public name: string; + + /** ValidateFlowRequest languageCode. */ + public languageCode: string; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. - * @param error Error, if any - * @param [response] Page + * Creates a new ValidateFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateFlowRequest instance */ - type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. - * @param error Error, if any - * @param [response] Page + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * @param message ValidateFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. - * @param error Error, if any - * @param [response] Empty + * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a Page. */ - interface IPage { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; - /** Page name */ - name?: (string|null); + /** + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; - /** Page displayName */ - displayName?: (string|null); + /** + * Verifies a ValidateFlowRequest 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); - /** Page entryFulfillment */ - entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + /** + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest; - /** Page form */ - form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + /** + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * @param message ValidateFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Page transitionRouteGroups */ - transitionRouteGroups?: (string[]|null); + /** + * Converts this ValidateFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Page transitionRoutes */ - transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + /** + * Gets the default type url for ValidateFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Page eventHandlers */ - eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + /** Properties of a GetFlowValidationResultRequest. */ + interface IGetFlowValidationResultRequest { - /** Page advancedSettings */ - advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** GetFlowValidationResultRequest name */ + name?: (string|null); - /** Page knowledgeConnectorSettings */ - knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); + /** GetFlowValidationResultRequest languageCode */ + languageCode?: (string|null); } - /** Represents a Page. */ - class Page implements IPage { + /** Represents a GetFlowValidationResultRequest. */ + class GetFlowValidationResultRequest implements IGetFlowValidationResultRequest { /** - * Constructs a new Page. + * Constructs a new GetFlowValidationResultRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest); - /** Page name. */ + /** GetFlowValidationResultRequest name. */ public name: string; - /** Page displayName. */ - public displayName: string; - - /** Page entryFulfillment. */ - public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** Page form. */ - public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); - - /** Page transitionRouteGroups. */ - public transitionRouteGroups: string[]; - - /** Page transitionRoutes. */ - public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; - - /** Page eventHandlers. */ - public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - - /** Page advancedSettings. */ - public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - - /** Page knowledgeConnectorSettings. */ - public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); + /** GetFlowValidationResultRequest languageCode. */ + public languageCode: string; /** - * Creates a new Page instance using the specified properties. + * Creates a new GetFlowValidationResultRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Page instance + * @returns GetFlowValidationResultRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. - * @param message Page message or plain object to encode + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @param message GetFlowValidationResultRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Page + * @returns GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Page + * @returns GetFlowValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; /** - * Verifies a Page message. + * Verifies a GetFlowValidationResultRequest 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 Page message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Page + * @returns GetFlowValidationResultRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. - * @param message Page + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * @param message GetFlowValidationResultRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Page to JSON. + * Converts this GetFlowValidationResultRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Page + * Gets the default type url for GetFlowValidationResultRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Form. */ - interface IForm { + /** Properties of a FlowValidationResult. */ + interface IFlowValidationResult { - /** Form parameters */ - parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); + /** FlowValidationResult name */ + name?: (string|null); + + /** FlowValidationResult validationMessages */ + validationMessages?: (google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]|null); + + /** FlowValidationResult updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a Form. */ - class Form implements IForm { + /** Represents a FlowValidationResult. */ + class FlowValidationResult implements IFlowValidationResult { /** - * Constructs a new Form. + * Constructs a new FlowValidationResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult); - /** Form parameters. */ - public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; + /** FlowValidationResult name. */ + public name: string; + + /** FlowValidationResult validationMessages. */ + public validationMessages: google.cloud.dialogflow.cx.v3beta1.IValidationMessage[]; + + /** FlowValidationResult updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new Form instance using the specified properties. + * Creates a new FlowValidationResult instance using the specified properties. * @param [properties] Properties to set - * @returns Form instance + * @returns FlowValidationResult instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. - * @param message Form message or plain object to encode + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * @param message FlowValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes a FlowValidationResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Form + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Form + * @returns FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Verifies a Form message. + * Verifies a FlowValidationResult 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 Form message from a plain object. Also converts values to their respective internal types. + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Form + * @returns FlowValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowValidationResult; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. - * @param message Form + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. + * @param message FlowValidationResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Form to JSON. + * Converts this FlowValidationResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Form + * Gets the default type url for FlowValidationResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Form { - - /** Properties of a Parameter. */ - interface IParameter { + /** Properties of an ImportFlowRequest. */ + interface IImportFlowRequest { - /** Parameter displayName */ - displayName?: (string|null); + /** ImportFlowRequest parent */ + parent?: (string|null); - /** Parameter required */ - required?: (boolean|null); + /** ImportFlowRequest flowUri */ + flowUri?: (string|null); - /** Parameter entityType */ - entityType?: (string|null); + /** ImportFlowRequest flowContent */ + flowContent?: (Uint8Array|string|null); - /** Parameter isList */ - isList?: (boolean|null); + /** ImportFlowRequest importOption */ + importOption?: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null); - /** Parameter fillBehavior */ - fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** ImportFlowRequest flowImportStrategy */ + flowImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null); + } - /** Parameter defaultValue */ - defaultValue?: (google.protobuf.IValue|null); + /** Represents an ImportFlowRequest. */ + class ImportFlowRequest implements IImportFlowRequest { - /** Parameter redact */ - redact?: (boolean|null); + /** + * Constructs a new ImportFlowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest); - /** Parameter advancedSettings */ - advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - } + /** ImportFlowRequest parent. */ + public parent: string; - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** ImportFlowRequest flowUri. */ + public flowUri?: (string|null); - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); + /** ImportFlowRequest flowContent. */ + public flowContent?: (Uint8Array|string|null); - /** Parameter displayName. */ - public displayName: string; + /** ImportFlowRequest importOption. */ + public importOption: (google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption); - /** Parameter required. */ - public required: boolean; + /** ImportFlowRequest flowImportStrategy. */ + public flowImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null); - /** Parameter entityType. */ - public entityType: string; + /** ImportFlowRequest flow. */ + public flow?: ("flowUri"|"flowContent"); - /** Parameter isList. */ - public isList: boolean; + /** + * Creates a new ImportFlowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportFlowRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; - /** Parameter fillBehavior. */ - public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + /** + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter defaultValue. */ - public defaultValue?: (google.protobuf.IValue|null); + /** + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * @param message ImportFlowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter redact. */ - public redact: boolean; - - /** Parameter advancedSettings. */ - public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Parameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Verifies a Parameter 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 Parameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Parameter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; - - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Parameter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Parameter { - - /** Properties of a FillBehavior. */ - interface IFillBehavior { - - /** FillBehavior initialPromptFulfillment */ - initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** FillBehavior repromptEventHandlers */ - repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); - } - - /** Represents a FillBehavior. */ - class FillBehavior implements IFillBehavior { - - /** - * Constructs a new FillBehavior. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); - - /** FillBehavior initialPromptFulfillment. */ - public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** FillBehavior repromptEventHandlers. */ - public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @param [properties] Properties to set - * @returns FillBehavior instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an ImportFlowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @param message FillBehavior message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportFlowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Verifies an ImportFlowRequest 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 FillBehavior message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportFlowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest; - /** - * Verifies a FillBehavior 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 ImportFlowRequest message. Also converts values to other types if specified. + * @param message ImportFlowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FillBehavior - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + /** + * Converts this ImportFlowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @param message FillBehavior - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for ImportFlowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this FillBehavior to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace ImportFlowRequest { - /** - * Gets the default type url for FillBehavior - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ImportOption enum. */ + enum ImportOption { + IMPORT_OPTION_UNSPECIFIED = 0, + KEEP = 1, + FALLBACK = 2 } } - /** Properties of an EventHandler. */ - interface IEventHandler { - - /** EventHandler name */ - name?: (string|null); - - /** EventHandler event */ - event?: (string|null); - - /** EventHandler triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** EventHandler targetPage */ - targetPage?: (string|null); + /** Properties of a FlowImportStrategy. */ + interface IFlowImportStrategy { - /** EventHandler targetFlow */ - targetFlow?: (string|null); + /** FlowImportStrategy globalImportStrategy */ + globalImportStrategy?: (google.cloud.dialogflow.cx.v3beta1.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportStrategy|null); } - /** Represents an EventHandler. */ - class EventHandler implements IEventHandler { + /** Represents a FlowImportStrategy. */ + class FlowImportStrategy implements IFlowImportStrategy { /** - * Constructs a new EventHandler. + * Constructs a new FlowImportStrategy. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); - - /** EventHandler name. */ - public name: string; - - /** EventHandler event. */ - public event: string; - - /** EventHandler triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** EventHandler targetPage. */ - public targetPage?: (string|null); - - /** EventHandler targetFlow. */ - public targetFlow?: (string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy); - /** EventHandler target. */ - public target?: ("targetPage"|"targetFlow"); + /** FlowImportStrategy globalImportStrategy. */ + public globalImportStrategy: (google.cloud.dialogflow.cx.v3beta1.ImportStrategy|keyof typeof google.cloud.dialogflow.cx.v3beta1.ImportStrategy); /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new FlowImportStrategy instance using the specified properties. * @param [properties] Properties to set - * @returns EventHandler instance + * @returns FlowImportStrategy instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified FlowImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * @param message FlowImportStrategy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. - * @param message EventHandler message or plain object to encode + * Encodes the specified FlowImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * @param message FlowImportStrategy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes a FlowImportStrategy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EventHandler + * @returns FlowImportStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes a FlowImportStrategy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EventHandler + * @returns FlowImportStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; /** - * Verifies an EventHandler message. + * Verifies a FlowImportStrategy 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. + * Creates a FlowImportStrategy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EventHandler + * @returns FlowImportStrategy */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. - * @param message EventHandler + * Creates a plain object from a FlowImportStrategy message. Also converts values to other types if specified. + * @param message FlowImportStrategy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EventHandler to JSON. + * Converts this FlowImportStrategy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EventHandler + * Gets the default type url for FlowImportStrategy * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransitionRoute. */ - interface ITransitionRoute { - - /** TransitionRoute name */ - name?: (string|null); - - /** TransitionRoute description */ - description?: (string|null); - - /** TransitionRoute intent */ - intent?: (string|null); - - /** TransitionRoute condition */ - condition?: (string|null); - - /** TransitionRoute triggerFulfillment */ - triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** TransitionRoute targetPage */ - targetPage?: (string|null); + /** Properties of an ImportFlowResponse. */ + interface IImportFlowResponse { - /** TransitionRoute targetFlow */ - targetFlow?: (string|null); + /** ImportFlowResponse flow */ + flow?: (string|null); } - /** Represents a TransitionRoute. */ - class TransitionRoute implements ITransitionRoute { + /** Represents an ImportFlowResponse. */ + class ImportFlowResponse implements IImportFlowResponse { /** - * Constructs a new TransitionRoute. + * Constructs a new ImportFlowResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); - - /** TransitionRoute name. */ - public name: string; - - /** TransitionRoute description. */ - public description: string; - - /** TransitionRoute intent. */ - public intent: string; - - /** TransitionRoute condition. */ - public condition: string; - - /** TransitionRoute triggerFulfillment. */ - public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - - /** TransitionRoute targetPage. */ - public targetPage?: (string|null); - - /** TransitionRoute targetFlow. */ - public targetFlow?: (string|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse); - /** TransitionRoute target. */ - public target?: ("targetPage"|"targetFlow"); + /** ImportFlowResponse flow. */ + public flow: string; /** - * Creates a new TransitionRoute instance using the specified properties. + * Creates a new ImportFlowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TransitionRoute instance + * @returns ImportFlowResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @param message TransitionRoute message or plain object to encode + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * @param message ImportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes an ImportFlowResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransitionRoute + * @returns ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransitionRoute + * @returns ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; /** - * Verifies a TransitionRoute message. + * Verifies an ImportFlowResponse 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 TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransitionRoute + * @returns ImportFlowResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. - * @param message TransitionRoute + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. + * @param message ImportFlowResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransitionRoute to JSON. + * Converts this ImportFlowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransitionRoute + * Gets the default type url for ImportFlowResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPagesRequest. */ - interface IListPagesRequest { - - /** ListPagesRequest parent */ - parent?: (string|null); + /** Properties of an ExportFlowRequest. */ + interface IExportFlowRequest { - /** ListPagesRequest languageCode */ - languageCode?: (string|null); + /** ExportFlowRequest name */ + name?: (string|null); - /** ListPagesRequest pageSize */ - pageSize?: (number|null); + /** ExportFlowRequest flowUri */ + flowUri?: (string|null); - /** ListPagesRequest pageToken */ - pageToken?: (string|null); + /** ExportFlowRequest includeReferencedFlows */ + includeReferencedFlows?: (boolean|null); } - /** Represents a ListPagesRequest. */ - class ListPagesRequest implements IListPagesRequest { + /** Represents an ExportFlowRequest. */ + class ExportFlowRequest implements IExportFlowRequest { /** - * Constructs a new ListPagesRequest. + * Constructs a new ExportFlowRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); - - /** ListPagesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest); - /** ListPagesRequest languageCode. */ - public languageCode: string; + /** ExportFlowRequest name. */ + public name: string; - /** ListPagesRequest pageSize. */ - public pageSize: number; + /** ExportFlowRequest flowUri. */ + public flowUri: string; - /** ListPagesRequest pageToken. */ - public pageToken: string; + /** ExportFlowRequest includeReferencedFlows. */ + public includeReferencedFlows: boolean; /** - * Creates a new ListPagesRequest instance using the specified properties. + * Creates a new ExportFlowRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesRequest instance + * @returns ExportFlowRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. - * @param message ListPagesRequest message or plain object to encode + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @param message ExportFlowRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. + * Decodes an ExportFlowRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesRequest + * @returns ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesRequest + * @returns ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; /** - * Verifies a ListPagesRequest message. + * Verifies an ExportFlowRequest 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 ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesRequest + * @returns ExportFlowRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. - * @param message ListPagesRequest + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * @param message ExportFlowRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesRequest to JSON. + * Converts this ExportFlowRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesRequest + * Gets the default type url for ExportFlowRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPagesResponse. */ - interface IListPagesResponse { + /** Properties of an ExportFlowResponse. */ + interface IExportFlowResponse { - /** ListPagesResponse pages */ - pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + /** ExportFlowResponse flowUri */ + flowUri?: (string|null); - /** ListPagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** ExportFlowResponse flowContent */ + flowContent?: (Uint8Array|string|null); } - /** Represents a ListPagesResponse. */ - class ListPagesResponse implements IListPagesResponse { + /** Represents an ExportFlowResponse. */ + class ExportFlowResponse implements IExportFlowResponse { /** - * Constructs a new ListPagesResponse. + * Constructs a new ExportFlowResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse); - /** ListPagesResponse pages. */ - public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; + /** ExportFlowResponse flowUri. */ + public flowUri?: (string|null); - /** ListPagesResponse nextPageToken. */ - public nextPageToken: string; + /** ExportFlowResponse flowContent. */ + public flowContent?: (Uint8Array|string|null); + + /** ExportFlowResponse flow. */ + public flow?: ("flowUri"|"flowContent"); /** - * Creates a new ListPagesResponse instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListPagesResponse instance + * @returns ExportFlowResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @param message ListPagesResponse message or plain object to encode + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * @param message ExportFlowResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPagesResponse + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPagesResponse + * @returns ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Verifies a ListPagesResponse message. + * Verifies an ExportFlowResponse 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 ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPagesResponse + * @returns ExportFlowResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @param message ListPagesResponse + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. + * @param message ExportFlowResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPagesResponse to JSON. + * Converts this ExportFlowResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPagesResponse + * Gets the default type url for ExportFlowResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPageRequest. */ - interface IGetPageRequest { + /** ImportStrategy enum. */ + enum ImportStrategy { + IMPORT_STRATEGY_UNSPECIFIED = 0, + IMPORT_STRATEGY_CREATE_NEW = 1, + IMPORT_STRATEGY_REPLACE = 2, + IMPORT_STRATEGY_KEEP = 3, + IMPORT_STRATEGY_MERGE = 4, + IMPORT_STRATEGY_THROW_ERROR = 5 + } - /** GetPageRequest name */ - name?: (string|null); + /** Represents a Pages */ + class Pages extends $protobuf.rpc.Service { - /** GetPageRequest languageCode */ - languageCode?: (string|null); - } + /** + * Constructs a new Pages 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); - /** Represents a GetPageRequest. */ - class GetPageRequest implements IGetPageRequest { + /** + * Creates new Pages 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): Pages; /** - * Constructs a new GetPageRequest. - * @param [properties] Properties to set + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPagesResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback): void; - /** GetPageRequest name. */ - public name: string; + /** + * Calls ListPages. + * @param request ListPagesRequest message or plain object + * @returns Promise + */ + public listPages(request: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): Promise; - /** GetPageRequest languageCode. */ - public languageCode: string; + /** + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page + */ + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback): void; /** - * Creates a new GetPageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPageRequest instance + * Calls GetPage. + * @param request GetPageRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public getPage(request: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): Promise; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback): void; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. - * @param message GetPageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreatePage. + * @param request CreatePageRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createPage(request: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): Promise; /** - * Decodes a GetPageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Page */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback): void; /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdatePage. + * @param request UpdatePageRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public updatePage(request: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): Promise; /** - * Verifies a GetPageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static verify(message: { [k: string]: any }): (string|null); + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, callback: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback): void; /** - * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPageRequest + * Calls DeletePage. + * @param request DeletePageRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; + public deletePage(request: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): Promise; + } + + namespace Pages { /** - * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. - * @param message GetPageRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. + * @param error Error, if any + * @param [response] ListPagesResponse */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListPagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) => void; /** - * Converts this GetPageRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. + * @param error Error, if any + * @param [response] Page */ - public toJSON(): { [k: string]: any }; + type GetPageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; /** - * Gets the default type url for GetPageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. + * @param error Error, if any + * @param [response] Page */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type CreatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. + * @param error Error, if any + * @param [response] Page + */ + type UpdatePageCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Page) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePageCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a CreatePageRequest. */ - interface ICreatePageRequest { + /** Properties of a Page. */ + interface IPage { - /** CreatePageRequest parent */ - parent?: (string|null); + /** Page name */ + name?: (string|null); - /** CreatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** Page displayName */ + displayName?: (string|null); - /** CreatePageRequest languageCode */ - languageCode?: (string|null); + /** Page entryFulfillment */ + entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** Page form */ + form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + + /** Page transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + + /** Page transitionRoutes */ + transitionRoutes?: (google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]|null); + + /** Page eventHandlers */ + eventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + + /** Page advancedSettings */ + advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Page knowledgeConnectorSettings */ + knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); } - /** Represents a CreatePageRequest. */ - class CreatePageRequest implements ICreatePageRequest { + /** Represents a Page. */ + class Page implements IPage { /** - * Constructs a new CreatePageRequest. + * Constructs a new Page. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPage); - /** CreatePageRequest parent. */ - public parent: string; + /** Page name. */ + public name: string; - /** CreatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); + /** Page displayName. */ + public displayName: string; - /** CreatePageRequest languageCode. */ - public languageCode: string; + /** Page entryFulfillment. */ + public entryFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** Page form. */ + public form?: (google.cloud.dialogflow.cx.v3beta1.IForm|null); + + /** Page transitionRouteGroups. */ + public transitionRouteGroups: string[]; + + /** Page transitionRoutes. */ + public transitionRoutes: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute[]; + + /** Page eventHandlers. */ + public eventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** Page advancedSettings. */ + public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Page knowledgeConnectorSettings. */ + public knowledgeConnectorSettings?: (google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null); /** - * Creates a new CreatePageRequest instance using the specified properties. + * Creates a new Page instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePageRequest instance + * @returns Page instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPage): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @param message CreatePageRequest message or plain object to encode + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * @param message Page message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePageRequest message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePageRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePageRequest + * @returns Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Verifies a CreatePageRequest message. + * Verifies a Page 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 CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePageRequest + * @returns Page */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Page; /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. - * @param message CreatePageRequest + * Creates a plain object from a Page message. Also converts values to other types if specified. + * @param message Page * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Page, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePageRequest to JSON. + * Converts this Page to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreatePageRequest + * Gets the default type url for Page * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdatePageRequest. */ - interface IUpdatePageRequest { - - /** UpdatePageRequest page */ - page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - - /** UpdatePageRequest languageCode */ - languageCode?: (string|null); + /** Properties of a Form. */ + interface IForm { - /** UpdatePageRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Form parameters */ + parameters?: (google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]|null); } - /** Represents an UpdatePageRequest. */ - class UpdatePageRequest implements IUpdatePageRequest { + /** Represents a Form. */ + class Form implements IForm { /** - * Constructs a new UpdatePageRequest. + * Constructs a new Form. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest); - - /** UpdatePageRequest page. */ - public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - - /** UpdatePageRequest languageCode. */ - public languageCode: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IForm); - /** UpdatePageRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Form parameters. */ + public parameters: google.cloud.dialogflow.cx.v3beta1.Form.IParameter[]; /** - * Creates a new UpdatePageRequest instance using the specified properties. + * Creates a new Form instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePageRequest instance + * @returns Form instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IForm): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @param message UpdatePageRequest message or plain object to encode + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @param message UpdatePageRequest message or plain object to encode + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * @param message Form message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IForm, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdatePageRequest + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePageRequest + * @returns Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Verifies an UpdatePageRequest message. + * Verifies a Form 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 UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdatePageRequest + * @returns Form */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. - * @param message UpdatePageRequest + * Creates a plain object from a Form message. Also converts values to other types if specified. + * @param message Form * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this Form to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdatePageRequest + * Gets the default type url for Form * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeletePageRequest. */ - interface IDeletePageRequest { - - /** DeletePageRequest name */ - name?: (string|null); + namespace Form { - /** DeletePageRequest force */ - force?: (boolean|null); - } + /** Properties of a Parameter. */ + interface IParameter { - /** Represents a DeletePageRequest. */ - class DeletePageRequest implements IDeletePageRequest { + /** Parameter displayName */ + displayName?: (string|null); - /** - * Constructs a new DeletePageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest); + /** Parameter required */ + required?: (boolean|null); - /** DeletePageRequest name. */ - public name: string; + /** Parameter entityType */ + entityType?: (string|null); - /** DeletePageRequest force. */ - public force: boolean; + /** Parameter isList */ + isList?: (boolean|null); - /** - * Creates a new DeletePageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePageRequest instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + /** Parameter fillBehavior */ + fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); - /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. - * @param message DeletePageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Parameter defaultValue */ + defaultValue?: (google.protobuf.IValue|null); - /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. - * @param message DeletePageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Parameter redact */ + redact?: (boolean|null); - /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + /** Parameter advancedSettings */ + advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter); + + /** Parameter displayName. */ + public displayName: string; + + /** Parameter required. */ + public required: boolean; + + /** Parameter entityType. */ + public entityType: string; + + /** Parameter isList. */ + public isList: boolean; + + /** Parameter fillBehavior. */ + public fillBehavior?: (google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null); + + /** Parameter defaultValue. */ + public defaultValue?: (google.protobuf.IValue|null); + + /** Parameter redact. */ + public redact: boolean; + + /** Parameter advancedSettings. */ + public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.IParameter): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Verifies a Parameter 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 Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Parameter { + + /** Properties of a FillBehavior. */ + interface IFillBehavior { + + /** FillBehavior initialPromptFulfillment */ + initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** FillBehavior repromptEventHandlers */ + repromptEventHandlers?: (google.cloud.dialogflow.cx.v3beta1.IEventHandler[]|null); + } + + /** Represents a FillBehavior. */ + class FillBehavior implements IFillBehavior { + + /** + * Constructs a new FillBehavior. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior); + + /** FillBehavior initialPromptFulfillment. */ + public initialPromptFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** FillBehavior repromptEventHandlers. */ + public repromptEventHandlers: google.cloud.dialogflow.cx.v3beta1.IEventHandler[]; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @param [properties] Properties to set + * @returns FillBehavior instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @param message FillBehavior message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Verifies a FillBehavior 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 FillBehavior message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FillBehavior + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @param message FillBehavior + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FillBehavior to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FillBehavior + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an EventHandler. */ + interface IEventHandler { + + /** EventHandler name */ + name?: (string|null); + + /** EventHandler event */ + event?: (string|null); + + /** EventHandler triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** EventHandler targetPage */ + targetPage?: (string|null); + + /** EventHandler targetFlow */ + targetFlow?: (string|null); + } + + /** Represents an EventHandler. */ + class EventHandler implements IEventHandler { + + /** + * Constructs a new EventHandler. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IEventHandler); + + /** EventHandler name. */ + public name: string; + + /** EventHandler event. */ + public event: string; + + /** EventHandler triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); + + /** EventHandler targetPage. */ + public targetPage?: (string|null); + + /** EventHandler targetFlow. */ + public targetFlow?: (string|null); + + /** EventHandler target. */ + public target?: ("targetPage"|"targetFlow"); + + /** + * 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.v3beta1.IEventHandler): google.cloud.dialogflow.cx.v3beta1.EventHandler; + + /** + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IEventHandler, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 DeletePageRequest + * @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.v3beta1.DeletePageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes an EventHandler message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePageRequest + * @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.v3beta1.DeletePageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Verifies a DeletePageRequest message. + * 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 a DeletePageRequest 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. * @param object Plain object - * @returns DeletePageRequest + * @returns EventHandler */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.EventHandler; /** - * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. - * @param message DeletePageRequest + * 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.v3beta1.DeletePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.EventHandler, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePageRequest to JSON. + * Converts this EventHandler to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeletePageRequest + * 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 KnowledgeConnectorSettings. */ - interface IKnowledgeConnectorSettings { + /** Properties of a TransitionRoute. */ + interface ITransitionRoute { - /** KnowledgeConnectorSettings enabled */ - enabled?: (boolean|null); + /** TransitionRoute name */ + name?: (string|null); - /** KnowledgeConnectorSettings triggerFulfillment */ + /** TransitionRoute description */ + description?: (string|null); + + /** TransitionRoute intent */ + intent?: (string|null); + + /** TransitionRoute condition */ + condition?: (string|null); + + /** TransitionRoute triggerFulfillment */ triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** KnowledgeConnectorSettings targetPage */ + /** TransitionRoute targetPage */ targetPage?: (string|null); - /** KnowledgeConnectorSettings targetFlow */ + /** TransitionRoute targetFlow */ targetFlow?: (string|null); - - /** KnowledgeConnectorSettings dataStoreConnections */ - dataStoreConnections?: (google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection[]|null); } - /** Represents a KnowledgeConnectorSettings. */ - class KnowledgeConnectorSettings implements IKnowledgeConnectorSettings { + /** Represents a TransitionRoute. */ + class TransitionRoute implements ITransitionRoute { /** - * Constructs a new KnowledgeConnectorSettings. + * Constructs a new TransitionRoute. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute); - /** KnowledgeConnectorSettings enabled. */ - public enabled: boolean; + /** TransitionRoute name. */ + public name: string; - /** KnowledgeConnectorSettings triggerFulfillment. */ + /** TransitionRoute description. */ + public description: string; + + /** TransitionRoute intent. */ + public intent: string; + + /** TransitionRoute condition. */ + public condition: string; + + /** TransitionRoute triggerFulfillment. */ public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** KnowledgeConnectorSettings targetPage. */ + /** TransitionRoute targetPage. */ public targetPage?: (string|null); - /** KnowledgeConnectorSettings targetFlow. */ + /** TransitionRoute targetFlow. */ public targetFlow?: (string|null); - /** KnowledgeConnectorSettings dataStoreConnections. */ - public dataStoreConnections: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection[]; - - /** KnowledgeConnectorSettings target. */ + /** TransitionRoute target. */ public target?: ("targetPage"|"targetFlow"); /** - * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * Creates a new TransitionRoute instance using the specified properties. * @param [properties] Properties to set - * @returns KnowledgeConnectorSettings instance + * @returns TransitionRoute instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. - * @param message KnowledgeConnectorSettings message or plain object to encode + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. - * @param message KnowledgeConnectorSettings message or plain object to encode + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. + * @param message TransitionRoute message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ITransitionRoute, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KnowledgeConnectorSettings + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KnowledgeConnectorSettings + * @returns TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Verifies a KnowledgeConnectorSettings message. + * Verifies a TransitionRoute 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 KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KnowledgeConnectorSettings + * @returns TransitionRoute */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.TransitionRoute; /** - * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. - * @param message KnowledgeConnectorSettings + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * @param message TransitionRoute * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.TransitionRoute, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KnowledgeConnectorSettings to JSON. + * Converts this TransitionRoute to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KnowledgeConnectorSettings + * Gets the default type url for TransitionRoute * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DataStoreConnection. */ - interface IDataStoreConnection { + /** Properties of a ListPagesRequest. */ + interface IListPagesRequest { - /** DataStoreConnection dataStoreType */ - dataStoreType?: (google.cloud.dialogflow.cx.v3beta1.DataStoreType|keyof typeof google.cloud.dialogflow.cx.v3beta1.DataStoreType|null); + /** ListPagesRequest parent */ + parent?: (string|null); - /** DataStoreConnection dataStore */ - dataStore?: (string|null); + /** ListPagesRequest languageCode */ + languageCode?: (string|null); + + /** ListPagesRequest pageSize */ + pageSize?: (number|null); + + /** ListPagesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DataStoreConnection. */ - class DataStoreConnection implements IDataStoreConnection { + /** Represents a ListPagesRequest. */ + class ListPagesRequest implements IListPagesRequest { /** - * Constructs a new DataStoreConnection. + * Constructs a new ListPagesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest); - /** DataStoreConnection dataStoreType. */ - public dataStoreType: (google.cloud.dialogflow.cx.v3beta1.DataStoreType|keyof typeof google.cloud.dialogflow.cx.v3beta1.DataStoreType); + /** ListPagesRequest parent. */ + public parent: string; - /** DataStoreConnection dataStore. */ - public dataStore: string; + /** ListPagesRequest languageCode. */ + public languageCode: string; + + /** ListPagesRequest pageSize. */ + public pageSize: number; + + /** ListPagesRequest pageToken. */ + public pageToken: string; /** - * Creates a new DataStoreConnection instance using the specified properties. + * Creates a new ListPagesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DataStoreConnection instance + * @returns ListPagesRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; /** - * Encodes the specified DataStoreConnection message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. - * @param message DataStoreConnection message or plain object to encode + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataStoreConnection message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. - * @param message DataStoreConnection message or plain object to encode + * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @param message ListPagesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataStoreConnection message from the specified reader or buffer. + * Decodes a ListPagesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataStoreConnection + * @returns ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; /** - * Decodes a DataStoreConnection message from the specified reader or buffer, length delimited. + * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataStoreConnection + * @returns ListPagesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; /** - * Verifies a DataStoreConnection message. + * Verifies a ListPagesRequest 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 DataStoreConnection message from a plain object. Also converts values to their respective internal types. + * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataStoreConnection + * @returns ListPagesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesRequest; /** - * Creates a plain object from a DataStoreConnection message. Also converts values to other types if specified. - * @param message DataStoreConnection + * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * @param message ListPagesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataStoreConnection to JSON. + * Converts this ListPagesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataStoreConnection + * Gets the default type url for ListPagesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** DataStoreType enum. */ - enum DataStoreType { - DATA_STORE_TYPE_UNSPECIFIED = 0, - PUBLIC_WEB = 1, - UNSTRUCTURED = 2, - STRUCTURED = 3 + /** Properties of a ListPagesResponse. */ + interface IListPagesResponse { + + /** ListPagesResponse pages */ + pages?: (google.cloud.dialogflow.cx.v3beta1.IPage[]|null); + + /** ListPagesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Properties of a Fulfillment. */ - interface IFulfillment { + /** Represents a ListPagesResponse. */ + class ListPagesResponse implements IListPagesResponse { - /** Fulfillment messages */ - messages?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]|null); + /** + * Constructs a new ListPagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse); - /** Fulfillment webhook */ - webhook?: (string|null); + /** ListPagesResponse pages. */ + public pages: google.cloud.dialogflow.cx.v3beta1.IPage[]; - /** Fulfillment returnPartialResponses */ - returnPartialResponses?: (boolean|null); + /** ListPagesResponse nextPageToken. */ + public nextPageToken: string; - /** Fulfillment tag */ - tag?: (string|null); + /** + * Creates a new ListPagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; - /** Fulfillment setParameterActions */ - setParameterActions?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]|null); + /** + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Fulfillment conditionalCases */ - conditionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]|null); + /** + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. + * @param message ListPagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListPagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Fulfillment advancedSettings */ - advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** + * Decodes a ListPagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; - /** Fulfillment enableGenerativeFallback */ - enableGenerativeFallback?: (boolean|null); - } + /** + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; - /** Represents a Fulfillment. */ - class Fulfillment implements IFulfillment { + /** + * Verifies a ListPagesResponse 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); /** - * Constructs a new Fulfillment. - * @param [properties] Properties to set + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPagesResponse */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment); + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListPagesResponse; - /** Fulfillment messages. */ - public messages: google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]; + /** + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. + * @param message ListPagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Fulfillment webhook. */ - public webhook: string; + /** + * Converts this ListPagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Fulfillment returnPartialResponses. */ - public returnPartialResponses: boolean; + /** + * Gets the default type url for ListPagesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Fulfillment tag. */ - public tag: string; + /** Properties of a GetPageRequest. */ + interface IGetPageRequest { - /** Fulfillment setParameterActions. */ - public setParameterActions: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]; + /** GetPageRequest name */ + name?: (string|null); - /** Fulfillment conditionalCases. */ - public conditionalCases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]; + /** GetPageRequest languageCode */ + languageCode?: (string|null); + } - /** Fulfillment advancedSettings. */ - public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** Represents a GetPageRequest. */ + class GetPageRequest implements IGetPageRequest { - /** Fulfillment enableGenerativeFallback. */ - public enableGenerativeFallback: boolean; + /** + * Constructs a new GetPageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest); + + /** GetPageRequest name. */ + public name: string; + + /** GetPageRequest languageCode. */ + public languageCode: string; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new GetPageRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Fulfillment instance + * @returns GetPageRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @param message GetPageRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a GetPageRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Fulfillment + * @returns GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fulfillment + * @returns GetPageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; /** - * Verifies a Fulfillment message. + * Verifies a GetPageRequest 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 Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fulfillment + * @returns GetPageRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetPageRequest; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. - * @param message Fulfillment + * Creates a plain object from a GetPageRequest message. Also converts values to other types if specified. + * @param message GetPageRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetPageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fulfillment to JSON. + * Converts this GetPageRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Fulfillment + * Gets the default type url for GetPageRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Fulfillment { + /** Properties of a CreatePageRequest. */ + interface ICreatePageRequest { - /** Properties of a SetParameterAction. */ - interface ISetParameterAction { + /** CreatePageRequest parent */ + parent?: (string|null); - /** SetParameterAction parameter */ - parameter?: (string|null); + /** CreatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - /** SetParameterAction value */ - value?: (google.protobuf.IValue|null); - } + /** CreatePageRequest languageCode */ + languageCode?: (string|null); + } - /** Represents a SetParameterAction. */ - class SetParameterAction implements ISetParameterAction { + /** Represents a CreatePageRequest. */ + class CreatePageRequest implements ICreatePageRequest { - /** - * Constructs a new SetParameterAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction); + /** + * Constructs a new CreatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest); - /** SetParameterAction parameter. */ - public parameter: string; + /** CreatePageRequest parent. */ + public parent: string; - /** SetParameterAction value. */ - public value?: (google.protobuf.IValue|null); + /** CreatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - /** - * Creates a new SetParameterAction instance using the specified properties. - * @param [properties] Properties to set - * @returns SetParameterAction instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** CreatePageRequest languageCode. */ + public languageCode: string; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @param message SetParameterAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CreatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @param message SetParameterAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @param message CreatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; - /** - * Verifies a SetParameterAction 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 CreatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetParameterAction - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; + /** + * Verifies a CreatePageRequest 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 a SetParameterAction message. Also converts values to other types if specified. - * @param message SetParameterAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreatePageRequest; - /** - * Converts this SetParameterAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @param message CreatePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for SetParameterAction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this CreatePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ConditionalCases. */ - interface IConditionalCases { + /** + * Gets the default type url for CreatePageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ConditionalCases cases */ - cases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]|null); - } + /** Properties of an UpdatePageRequest. */ + interface IUpdatePageRequest { - /** Represents a ConditionalCases. */ - class ConditionalCases implements IConditionalCases { + /** UpdatePageRequest page */ + page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - /** - * Constructs a new ConditionalCases. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases); + /** UpdatePageRequest languageCode */ + languageCode?: (string|null); - /** ConditionalCases cases. */ - public cases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]; + /** UpdatePageRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** - * Creates a new ConditionalCases instance using the specified properties. - * @param [properties] Properties to set - * @returns ConditionalCases instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** Represents an UpdatePageRequest. */ + class UpdatePageRequest implements IUpdatePageRequest { - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @param message ConditionalCases message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new UpdatePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest); - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @param message ConditionalCases message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdatePageRequest page. */ + public page?: (google.cloud.dialogflow.cx.v3beta1.IPage|null); - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** UpdatePageRequest languageCode. */ + public languageCode: string; - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** UpdatePageRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Verifies a ConditionalCases 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 new UpdatePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConditionalCases - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; + /** + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @param message UpdatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @param message ConditionalCases - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. + * @param message UpdatePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ConditionalCases to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; - /** - * Gets the default type url for ConditionalCases - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ConditionalCases { - - /** Properties of a Case. */ - interface ICase { - - /** Case condition */ - condition?: (string|null); - - /** Case caseContent */ - caseContent?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]|null); - } - - /** Represents a Case. */ - class Case implements ICase { - - /** - * Constructs a new Case. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase); - - /** Case condition. */ - public condition: string; - - /** Case caseContent. */ - public caseContent: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]; - - /** - * Creates a new Case instance using the specified properties. - * @param [properties] Properties to set - * @returns Case instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; - - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @param message Case message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @param message Case message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Case message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; - - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; - - /** - * Verifies a Case 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 Case message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Case - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + /** + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @param message Case - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an UpdatePageRequest 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 Case to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest; - /** - * Gets the default type url for Case - * @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 an UpdatePageRequest message. Also converts values to other types if specified. + * @param message UpdatePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace Case { + /** + * Converts this UpdatePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a CaseContent. */ - interface ICaseContent { + /** + * Gets the default type url for UpdatePageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** CaseContent message */ - message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + /** Properties of a DeletePageRequest. */ + interface IDeletePageRequest { - /** CaseContent additionalCases */ - additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); - } + /** DeletePageRequest name */ + name?: (string|null); - /** Represents a CaseContent. */ - class CaseContent implements ICaseContent { + /** DeletePageRequest force */ + force?: (boolean|null); + } - /** - * Constructs a new CaseContent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent); + /** Represents a DeletePageRequest. */ + class DeletePageRequest implements IDeletePageRequest { - /** CaseContent message. */ - public message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + /** + * Constructs a new DeletePageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest); - /** CaseContent additionalCases. */ - public additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + /** DeletePageRequest name. */ + public name: string; - /** CaseContent casesOrMessage. */ - public casesOrMessage?: ("message"|"additionalCases"); + /** DeletePageRequest force. */ + public force: boolean; - /** - * Creates a new CaseContent instance using the specified properties. - * @param [properties] Properties to set - * @returns CaseContent instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePageRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @param message CaseContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @param message DeletePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @param message CaseContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @param message DeletePageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; - /** - * Verifies a CaseContent 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 DeletePageRequest 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 CaseContent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CaseContent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + /** + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeletePageRequest; - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @param message CaseContent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @param message DeletePageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this CaseContent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this DeletePageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for CaseContent - * @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 DeletePageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResponseMessage. */ - interface IResponseMessage { - - /** ResponseMessage text */ - text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); - - /** ResponseMessage payload */ - payload?: (google.protobuf.IStruct|null); - - /** ResponseMessage conversationSuccess */ - conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); - - /** ResponseMessage outputAudioText */ - outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); - - /** ResponseMessage liveAgentHandoff */ - liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); - - /** ResponseMessage endInteraction */ - endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + /** Properties of a KnowledgeConnectorSettings. */ + interface IKnowledgeConnectorSettings { - /** ResponseMessage playAudio */ - playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + /** KnowledgeConnectorSettings enabled */ + enabled?: (boolean|null); - /** ResponseMessage mixedAudio */ - mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + /** KnowledgeConnectorSettings triggerFulfillment */ + triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ResponseMessage telephonyTransferCall */ - telephonyTransferCall?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null); + /** KnowledgeConnectorSettings targetPage */ + targetPage?: (string|null); - /** ResponseMessage knowledgeInfoCard */ - knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null); + /** KnowledgeConnectorSettings targetFlow */ + targetFlow?: (string|null); - /** ResponseMessage channel */ - channel?: (string|null); + /** KnowledgeConnectorSettings dataStoreConnections */ + dataStoreConnections?: (google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection[]|null); } - /** Represents a ResponseMessage. */ - class ResponseMessage implements IResponseMessage { + /** Represents a KnowledgeConnectorSettings. */ + class KnowledgeConnectorSettings implements IKnowledgeConnectorSettings { /** - * Constructs a new ResponseMessage. + * Constructs a new KnowledgeConnectorSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage); - - /** ResponseMessage text. */ - public text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); - - /** ResponseMessage payload. */ - public payload?: (google.protobuf.IStruct|null); - - /** ResponseMessage conversationSuccess. */ - public conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); - - /** ResponseMessage outputAudioText. */ - public outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); - - /** ResponseMessage liveAgentHandoff. */ - public liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); - - /** ResponseMessage endInteraction. */ - public endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings); - /** ResponseMessage playAudio. */ - public playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + /** KnowledgeConnectorSettings enabled. */ + public enabled: boolean; - /** ResponseMessage mixedAudio. */ - public mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + /** KnowledgeConnectorSettings triggerFulfillment. */ + public triggerFulfillment?: (google.cloud.dialogflow.cx.v3beta1.IFulfillment|null); - /** ResponseMessage telephonyTransferCall. */ - public telephonyTransferCall?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null); + /** KnowledgeConnectorSettings targetPage. */ + public targetPage?: (string|null); - /** ResponseMessage knowledgeInfoCard. */ - public knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null); + /** KnowledgeConnectorSettings targetFlow. */ + public targetFlow?: (string|null); - /** ResponseMessage channel. */ - public channel: string; + /** KnowledgeConnectorSettings dataStoreConnections. */ + public dataStoreConnections: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection[]; - /** ResponseMessage message. */ - public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"); + /** KnowledgeConnectorSettings target. */ + public target?: ("targetPage"|"targetFlow"); /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new KnowledgeConnectorSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ResponseMessage instance + * @returns KnowledgeConnectorSettings instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * 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 ResponseMessage + * @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.v3beta1.ResponseMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResponseMessage + * @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.v3beta1.ResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; /** - * Verifies a ResponseMessage message. + * 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 ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResponseMessage + * @returns KnowledgeConnectorSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. - * @param message ResponseMessage + * 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.v3beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResponseMessage to JSON. + * Converts this KnowledgeConnectorSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResponseMessage + * 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; } - namespace ResponseMessage { - - /** Properties of a Text. */ - interface IText { + /** Properties of a DataStoreConnection. */ + interface IDataStoreConnection { - /** Text text */ - text?: (string[]|null); + /** DataStoreConnection dataStoreType */ + dataStoreType?: (google.cloud.dialogflow.cx.v3beta1.DataStoreType|keyof typeof google.cloud.dialogflow.cx.v3beta1.DataStoreType|null); - /** Text allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); - } + /** DataStoreConnection dataStore */ + dataStore?: (string|null); + } - /** Represents a Text. */ - class Text implements IText { + /** Represents a DataStoreConnection. */ + class DataStoreConnection implements IDataStoreConnection { - /** - * Constructs a new Text. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText); + /** + * Constructs a new DataStoreConnection. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection); - /** Text text. */ - public text: string[]; + /** DataStoreConnection dataStoreType. */ + public dataStoreType: (google.cloud.dialogflow.cx.v3beta1.DataStoreType|keyof typeof google.cloud.dialogflow.cx.v3beta1.DataStoreType); - /** Text allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** DataStoreConnection dataStore. */ + public dataStore: string; - /** - * Creates a new Text instance using the specified properties. - * @param [properties] Properties to set - * @returns Text instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + /** + * Creates a new DataStoreConnection instance using the specified properties. + * @param [properties] Properties to set + * @returns DataStoreConnection instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; - /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DataStoreConnection message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * @param message DataStoreConnection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @param message Text message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DataStoreConnection message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * @param message DataStoreConnection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Text message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + /** + * Decodes a DataStoreConnection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataStoreConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + /** + * Decodes a DataStoreConnection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataStoreConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; - /** - * Verifies a Text 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 DataStoreConnection 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 Text message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Text - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + /** + * Creates a DataStoreConnection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataStoreConnection + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DataStoreConnection; - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @param message Text - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DataStoreConnection message. Also converts values to other types if specified. + * @param message DataStoreConnection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Text to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this DataStoreConnection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Text - * @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 DataStoreConnection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a LiveAgentHandoff. */ - interface ILiveAgentHandoff { + /** DataStoreType enum. */ + enum DataStoreType { + DATA_STORE_TYPE_UNSPECIFIED = 0, + PUBLIC_WEB = 1, + UNSTRUCTURED = 2, + STRUCTURED = 3 + } - /** LiveAgentHandoff metadata */ - metadata?: (google.protobuf.IStruct|null); - } + /** Properties of a Fulfillment. */ + interface IFulfillment { - /** Represents a LiveAgentHandoff. */ - class LiveAgentHandoff implements ILiveAgentHandoff { + /** Fulfillment messages */ + messages?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]|null); - /** - * Constructs a new LiveAgentHandoff. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff); + /** Fulfillment webhook */ + webhook?: (string|null); - /** LiveAgentHandoff metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** Fulfillment returnPartialResponses */ + returnPartialResponses?: (boolean|null); - /** - * Creates a new LiveAgentHandoff instance using the specified properties. - * @param [properties] Properties to set - * @returns LiveAgentHandoff instance - */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** Fulfillment tag */ + tag?: (string|null); - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @param message LiveAgentHandoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** Fulfillment setParameterActions */ + setParameterActions?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]|null); - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @param message LiveAgentHandoff message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** Fulfillment conditionalCases */ + conditionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]|null); - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** Fulfillment advancedSettings */ + advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** Fulfillment enableGenerativeFallback */ + enableGenerativeFallback?: (boolean|null); + } - /** - * Verifies a LiveAgentHandoff 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); + /** Represents a Fulfillment. */ + class Fulfillment implements IFulfillment { - /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LiveAgentHandoff - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; + /** + * Constructs a new Fulfillment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment); - /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. - * @param message LiveAgentHandoff - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Fulfillment messages. */ + public messages: google.cloud.dialogflow.cx.v3beta1.IResponseMessage[]; - /** - * Converts this LiveAgentHandoff to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Fulfillment webhook. */ + public webhook: string; - /** - * Gets the default type url for LiveAgentHandoff - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Fulfillment returnPartialResponses. */ + public returnPartialResponses: boolean; - /** Properties of a ConversationSuccess. */ - interface IConversationSuccess { + /** Fulfillment tag. */ + public tag: string; - /** ConversationSuccess metadata */ - metadata?: (google.protobuf.IStruct|null); + /** Fulfillment setParameterActions. */ + public setParameterActions: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction[]; + + /** Fulfillment conditionalCases. */ + public conditionalCases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases[]; + + /** Fulfillment advancedSettings. */ + public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** Fulfillment enableGenerativeFallback. */ + public enableGenerativeFallback: boolean; + + /** + * Creates a new Fulfillment instance using the specified properties. + * @param [properties] Properties to set + * @returns Fulfillment instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFulfillment): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @param message Fulfillment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @param message Fulfillment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fulfillment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Verifies a Fulfillment 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 Fulfillment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fulfillment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment; + + /** + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * @param message Fulfillment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fulfillment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Fulfillment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Fulfillment { + + /** Properties of a SetParameterAction. */ + interface ISetParameterAction { + + /** SetParameterAction parameter */ + parameter?: (string|null); + + /** SetParameterAction value */ + value?: (google.protobuf.IValue|null); } - /** Represents a ConversationSuccess. */ - class ConversationSuccess implements IConversationSuccess { + /** Represents a SetParameterAction. */ + class SetParameterAction implements ISetParameterAction { /** - * Constructs a new ConversationSuccess. + * Constructs a new SetParameterAction. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction); - /** ConversationSuccess metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** SetParameterAction parameter. */ + public parameter: string; + + /** SetParameterAction value. */ + public value?: (google.protobuf.IValue|null); /** - * Creates a new ConversationSuccess instance using the specified properties. + * Creates a new SetParameterAction instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationSuccess instance + * @returns SetParameterAction instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @param message ConversationSuccess message or plain object to encode + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @param message SetParameterAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @param message ConversationSuccess message or plain object to encode + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. + * @param message SetParameterAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationSuccess message from the specified reader or buffer. + * Decodes a SetParameterAction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationSuccess + * @returns SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationSuccess + * @returns SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; /** - * Verifies a ConversationSuccess message. + * Verifies a SetParameterAction 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 ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationSuccess + * @returns SetParameterAction */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction; /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @param message ConversationSuccess + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. + * @param message SetParameterAction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationSuccess to JSON. + * Converts this SetParameterAction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationSuccess + * Gets the default type url for SetParameterAction * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OutputAudioText. */ - interface IOutputAudioText { - - /** OutputAudioText text */ - text?: (string|null); - - /** OutputAudioText ssml */ - ssml?: (string|null); + /** Properties of a ConditionalCases. */ + interface IConditionalCases { - /** OutputAudioText allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); + /** ConditionalCases cases */ + cases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]|null); } - /** Represents an OutputAudioText. */ - class OutputAudioText implements IOutputAudioText { + /** Represents a ConditionalCases. */ + class ConditionalCases implements IConditionalCases { /** - * Constructs a new OutputAudioText. + * Constructs a new ConditionalCases. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText); - - /** OutputAudioText text. */ - public text?: (string|null); - - /** OutputAudioText ssml. */ - public ssml?: (string|null); - - /** OutputAudioText allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases); - /** OutputAudioText source. */ - public source?: ("text"|"ssml"); + /** ConditionalCases cases. */ + public cases: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase[]; /** - * Creates a new OutputAudioText instance using the specified properties. + * Creates a new ConditionalCases instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudioText instance + * @returns ConditionalCases instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @param message OutputAudioText message or plain object to encode + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @param message ConditionalCases message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @param message OutputAudioText message or plain object to encode + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. + * @param message ConditionalCases message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioText message from the specified reader or buffer. + * Decodes a ConditionalCases message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudioText + * @returns ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioText + * @returns ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; /** - * Verifies an OutputAudioText message. + * Verifies a ConditionalCases 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 OutputAudioText message from a plain object. Also converts values to their respective internal types. + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioText + * @returns ConditionalCases */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases; /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @param message OutputAudioText + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. + * @param message ConditionalCases * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioText to JSON. + * Converts this ConditionalCases to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OutputAudioText + * Gets the default type url for ConditionalCases * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EndInteraction. */ - interface IEndInteraction { - } + namespace ConditionalCases { - /** Represents an EndInteraction. */ - class EndInteraction implements IEndInteraction { + /** Properties of a Case. */ + interface ICase { - /** - * Constructs a new EndInteraction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction); + /** Case condition */ + condition?: (string|null); - /** - * Creates a new EndInteraction instance using the specified properties. - * @param [properties] Properties to set - * @returns EndInteraction instance + /** Case caseContent */ + caseContent?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]|null); + } + + /** Represents a Case. */ + class Case implements ICase { + + /** + * Constructs a new Case. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase); + + /** Case condition. */ + public condition: string; + + /** Case caseContent. */ + public caseContent: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent[]; + + /** + * Creates a new Case instance using the specified properties. + * @param [properties] Properties to set + * @returns Case instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @param message Case message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. + * @param message Case message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Case message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Decodes a Case message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Case + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Verifies a Case 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 Case message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Case + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case; + + /** + * Creates a plain object from a Case message. Also converts values to other types if specified. + * @param message Case + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Case to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Case + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Case { + + /** Properties of a CaseContent. */ + interface ICaseContent { + + /** CaseContent message */ + message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + + /** CaseContent additionalCases */ + additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + } + + /** Represents a CaseContent. */ + class CaseContent implements ICaseContent { + + /** + * Constructs a new CaseContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent); + + /** CaseContent message. */ + public message?: (google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null); + + /** CaseContent additionalCases. */ + public additionalCases?: (google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null); + + /** CaseContent casesOrMessage. */ + public casesOrMessage?: ("message"|"additionalCases"); + + /** + * Creates a new CaseContent instance using the specified properties. + * @param [properties] Properties to set + * @returns CaseContent instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @param message CaseContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @param message CaseContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Verifies a CaseContent 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 CaseContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaseContent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent; + + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @param message CaseContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaseContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaseContent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Properties of a ResponseMessage. */ + interface IResponseMessage { + + /** ResponseMessage text */ + text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + + /** ResponseMessage payload */ + payload?: (google.protobuf.IStruct|null); + + /** ResponseMessage conversationSuccess */ + conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + + /** ResponseMessage outputAudioText */ + outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + + /** ResponseMessage liveAgentHandoff */ + liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction */ + endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage playAudio */ + playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + + /** ResponseMessage mixedAudio */ + mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + + /** ResponseMessage telephonyTransferCall */ + telephonyTransferCall?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null); + + /** ResponseMessage knowledgeInfoCard */ + knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null); + + /** ResponseMessage channel */ + channel?: (string|null); + } + + /** Represents a ResponseMessage. */ + class ResponseMessage implements IResponseMessage { + + /** + * Constructs a new ResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage); + + /** ResponseMessage text. */ + public text?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null); + + /** ResponseMessage payload. */ + public payload?: (google.protobuf.IStruct|null); + + /** ResponseMessage conversationSuccess. */ + public conversationSuccess?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null); + + /** ResponseMessage outputAudioText. */ + public outputAudioText?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null); + + /** ResponseMessage liveAgentHandoff. */ + public liveAgentHandoff?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction. */ + public endInteraction?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage playAudio. */ + public playAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null); + + /** ResponseMessage mixedAudio. */ + public mixedAudio?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null); + + /** ResponseMessage telephonyTransferCall. */ + public telephonyTransferCall?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null); + + /** ResponseMessage knowledgeInfoCard. */ + public knowledgeInfoCard?: (google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null); + + /** ResponseMessage channel. */ + public channel: string; + + /** ResponseMessage message. */ + public message?: ("text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"); + + /** + * Creates a new ResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMessage instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IResponseMessage): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @param message ResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * @param message ResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Verifies a ResponseMessage 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 ResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage; + + /** + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * @param message ResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResponseMessage { + + /** Properties of a Text. */ + interface IText { + + /** Text text */ + text?: (string[]|null); + + /** Text allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents a Text. */ + class Text implements IText { + + /** + * Constructs a new Text. + * @param [properties] Properties to set */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText); + + /** Text text. */ + public text: string[]; + + /** Text allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; + + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @param message Text message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @param message EndInteraction message or plain object to encode + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @param message Text message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a Text message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EndInteraction + * @returns Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a Text message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EndInteraction + * @returns Text * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; /** - * Verifies an EndInteraction message. + * Verifies a Text message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a Text message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EndInteraction + * @returns Text */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. - * @param message EndInteraction + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @param message Text * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EndInteraction to JSON. + * Converts this Text to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EndInteraction + * Gets the default type url for Text * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PlayAudio. */ - interface IPlayAudio { - - /** PlayAudio audioUri */ - audioUri?: (string|null); + /** Properties of a LiveAgentHandoff. */ + interface ILiveAgentHandoff { - /** PlayAudio allowPlaybackInterruption */ - allowPlaybackInterruption?: (boolean|null); + /** LiveAgentHandoff metadata */ + metadata?: (google.protobuf.IStruct|null); } - /** Represents a PlayAudio. */ - class PlayAudio implements IPlayAudio { + /** Represents a LiveAgentHandoff. */ + class LiveAgentHandoff implements ILiveAgentHandoff { /** - * Constructs a new PlayAudio. + * Constructs a new LiveAgentHandoff. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio); - - /** PlayAudio audioUri. */ - public audioUri: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff); - /** PlayAudio allowPlaybackInterruption. */ - public allowPlaybackInterruption: boolean; + /** LiveAgentHandoff metadata. */ + public metadata?: (google.protobuf.IStruct|null); /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new LiveAgentHandoff instance using the specified properties. * @param [properties] Properties to set - * @returns PlayAudio instance + * @returns LiveAgentHandoff instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. - * @param message PlayAudio message or plain object to encode + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @param message LiveAgentHandoff message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. - * @param message PlayAudio message or plain object to encode + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @param message LiveAgentHandoff message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes a LiveAgentHandoff message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlayAudio + * @returns LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlayAudio + * @returns LiveAgentHandoff * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; /** - * Verifies a PlayAudio message. + * Verifies a LiveAgentHandoff message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlayAudio + * @returns LiveAgentHandoff */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff; /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. - * @param message PlayAudio + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @param message LiveAgentHandoff * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveAgentHandoff to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveAgentHandoff + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationSuccess. */ + interface IConversationSuccess { + + /** ConversationSuccess metadata */ + metadata?: (google.protobuf.IStruct|null); + } + + /** Represents a ConversationSuccess. */ + class ConversationSuccess implements IConversationSuccess { + + /** + * Constructs a new ConversationSuccess. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess); + + /** ConversationSuccess metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** + * Creates a new ConversationSuccess instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationSuccess instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @param message ConversationSuccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. + * @param message ConversationSuccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Verifies a ConversationSuccess 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 ConversationSuccess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationSuccess + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess; + + /** + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. + * @param message ConversationSuccess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationSuccess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationSuccess + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OutputAudioText. */ + interface IOutputAudioText { + + /** OutputAudioText text */ + text?: (string|null); + + /** OutputAudioText ssml */ + ssml?: (string|null); + + /** OutputAudioText allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents an OutputAudioText. */ + class OutputAudioText implements IOutputAudioText { + + /** + * Constructs a new OutputAudioText. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText); + + /** OutputAudioText text. */ + public text?: (string|null); + + /** OutputAudioText ssml. */ + public ssml?: (string|null); + + /** OutputAudioText allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** OutputAudioText source. */ + public source?: ("text"|"ssml"); + + /** + * Creates a new OutputAudioText instance using the specified properties. + * @param [properties] Properties to set + * @returns OutputAudioText instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @param message OutputAudioText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. + * @param message OutputAudioText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OutputAudioText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Verifies an OutputAudioText 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 OutputAudioText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OutputAudioText + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText; + + /** + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. + * @param message OutputAudioText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OutputAudioText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OutputAudioText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EndInteraction. */ + interface IEndInteraction { + } + + /** Represents an EndInteraction. */ + class EndInteraction implements IEndInteraction { + + /** + * Constructs a new EndInteraction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction); + + /** + * Creates a new EndInteraction instance using the specified properties. + * @param [properties] Properties to set + * @returns EndInteraction instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @param message EndInteraction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Verifies an EndInteraction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndInteraction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction; + + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @param message EndInteraction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndInteraction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndInteraction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlayAudio. */ + interface IPlayAudio { + + /** PlayAudio audioUri */ + audioUri?: (string|null); + + /** PlayAudio allowPlaybackInterruption */ + allowPlaybackInterruption?: (boolean|null); + } + + /** Represents a PlayAudio. */ + class PlayAudio implements IPlayAudio { + + /** + * Constructs a new PlayAudio. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio); + + /** PlayAudio audioUri. */ + public audioUri: string; + + /** PlayAudio allowPlaybackInterruption. */ + public allowPlaybackInterruption: boolean; + + /** + * Creates a new PlayAudio instance using the specified properties. + * @param [properties] Properties to set + * @returns PlayAudio instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @param message PlayAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @param message PlayAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Verifies a PlayAudio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlayAudio + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio; + + /** + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * @param message PlayAudio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PlayAudio to JSON. @@ -44897,20 +47298,6 @@ export namespace google { */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse - */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback): void; - - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @returns Promise - */ - public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): Promise; - /** * Calls GetEntityType. * @param request GetEntityTypeRequest message or plain object @@ -44966,16 +47353,23 @@ export namespace google { * @returns Promise */ public deleteEntityType(request: google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest): Promise; - } - namespace EntityTypes { + /** + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse + */ + public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|listEntityTypes}. - * @param error Error, if any - * @param [response] ListEntityTypesResponse + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) => void; + public listEntityTypes(request: google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest): Promise; + } + + namespace EntityTypes { /** * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|getEntityType}. @@ -45004,6 +47398,13 @@ export namespace google { * @param [response] Empty */ type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|listEntityTypes}. + * @param error Error, if any + * @param [response] ListEntityTypesResponse + */ + type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) => void; } /** Properties of an EntityType. */ @@ -55348,6 +57749,20 @@ export namespace google { * @returns Promise */ public fulfillIntent(request: google.cloud.dialogflow.cx.v3beta1.IFulfillIntentRequest): Promise; + + /** + * Calls SubmitAnswerFeedback. + * @param request SubmitAnswerFeedbackRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnswerFeedback + */ + public submitAnswerFeedback(request: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, callback: google.cloud.dialogflow.cx.v3beta1.Sessions.SubmitAnswerFeedbackCallback): void; + + /** + * Calls SubmitAnswerFeedback. + * @param request SubmitAnswerFeedbackRequest message or plain object + * @returns Promise + */ + public submitAnswerFeedback(request: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest): Promise; } namespace Sessions { @@ -55379,6 +57794,350 @@ export namespace google { * @param [response] FulfillIntentResponse */ type FulfillIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Sessions|submitAnswerFeedback}. + * @param error Error, if any + * @param [response] AnswerFeedback + */ + type SubmitAnswerFeedbackCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) => void; + } + + /** Properties of an AnswerFeedback. */ + interface IAnswerFeedback { + + /** AnswerFeedback rating */ + rating?: (google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating|keyof typeof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating|null); + + /** AnswerFeedback ratingReason */ + ratingReason?: (google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason|null); + + /** AnswerFeedback customRating */ + customRating?: (string|null); + } + + /** Represents an AnswerFeedback. */ + class AnswerFeedback implements IAnswerFeedback { + + /** + * Constructs a new AnswerFeedback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback); + + /** AnswerFeedback rating. */ + public rating: (google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating|keyof typeof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating); + + /** AnswerFeedback ratingReason. */ + public ratingReason?: (google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason|null); + + /** AnswerFeedback customRating. */ + public customRating: string; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerFeedback instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; + + /** + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; + + /** + * Verifies an AnswerFeedback 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 AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerFeedback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; + + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @param message AnswerFeedback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerFeedback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerFeedback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnswerFeedback { + + /** Rating enum. */ + enum Rating { + RATING_UNSPECIFIED = 0, + THUMBS_UP = 1, + THUMBS_DOWN = 2 + } + + /** Properties of a RatingReason. */ + interface IRatingReason { + + /** RatingReason reasonLabels */ + reasonLabels?: (string[]|null); + + /** RatingReason feedback */ + feedback?: (string|null); + } + + /** Represents a RatingReason. */ + class RatingReason implements IRatingReason { + + /** + * Constructs a new RatingReason. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason); + + /** RatingReason reasonLabels. */ + public reasonLabels: string[]; + + /** RatingReason feedback. */ + public feedback: string; + + /** + * Creates a new RatingReason instance using the specified properties. + * @param [properties] Properties to set + * @returns RatingReason instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason; + + /** + * Encodes the specified RatingReason message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.verify|verify} messages. + * @param message RatingReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RatingReason message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.verify|verify} messages. + * @param message RatingReason message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RatingReason message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RatingReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason; + + /** + * Decodes a RatingReason message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RatingReason + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason; + + /** + * Verifies a RatingReason 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 RatingReason message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RatingReason + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason; + + /** + * Creates a plain object from a RatingReason message. Also converts values to other types if specified. + * @param message RatingReason + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RatingReason to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RatingReason + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SubmitAnswerFeedbackRequest. */ + interface ISubmitAnswerFeedbackRequest { + + /** SubmitAnswerFeedbackRequest session */ + session?: (string|null); + + /** SubmitAnswerFeedbackRequest responseId */ + responseId?: (string|null); + + /** SubmitAnswerFeedbackRequest answerFeedback */ + answerFeedback?: (google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback|null); + + /** SubmitAnswerFeedbackRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SubmitAnswerFeedbackRequest. */ + class SubmitAnswerFeedbackRequest implements ISubmitAnswerFeedbackRequest { + + /** + * Constructs a new SubmitAnswerFeedbackRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest); + + /** SubmitAnswerFeedbackRequest session. */ + public session: string; + + /** SubmitAnswerFeedbackRequest responseId. */ + public responseId: string; + + /** SubmitAnswerFeedbackRequest answerFeedback. */ + public answerFeedback?: (google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback|null); + + /** SubmitAnswerFeedbackRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SubmitAnswerFeedbackRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SubmitAnswerFeedbackRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest): google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; + + /** + * Encodes the specified SubmitAnswerFeedbackRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @param message SubmitAnswerFeedbackRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubmitAnswerFeedbackRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @param message SubmitAnswerFeedbackRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubmitAnswerFeedbackRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubmitAnswerFeedbackRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; + + /** + * Verifies a SubmitAnswerFeedbackRequest 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 SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubmitAnswerFeedbackRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest; + + /** + * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. + * @param message SubmitAnswerFeedbackRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubmitAnswerFeedbackRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubmitAnswerFeedbackRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DetectIntentRequest. */ @@ -56258,6 +59017,12 @@ export namespace google { /** QueryParameters sessionTtl */ sessionTtl?: (google.protobuf.IDuration|null); + + /** QueryParameters endUserMetadata */ + endUserMetadata?: (google.protobuf.IStruct|null); + + /** QueryParameters searchConfig */ + searchConfig?: (google.cloud.dialogflow.cx.v3beta1.ISearchConfig|null); } /** Represents a QueryParameters. */ @@ -56305,6 +59070,12 @@ export namespace google { /** QueryParameters sessionTtl. */ public sessionTtl?: (google.protobuf.IDuration|null); + /** QueryParameters endUserMetadata. */ + public endUserMetadata?: (google.protobuf.IStruct|null); + + /** QueryParameters searchConfig. */ + public searchConfig?: (google.cloud.dialogflow.cx.v3beta1.ISearchConfig|null); + /** * Creates a new QueryParameters instance using the specified properties. * @param [properties] Properties to set @@ -56383,6 +59154,518 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SearchConfig. */ + interface ISearchConfig { + + /** SearchConfig boostSpecs */ + boostSpecs?: (google.cloud.dialogflow.cx.v3beta1.IBoostSpecs[]|null); + + /** SearchConfig filterSpecs */ + filterSpecs?: (google.cloud.dialogflow.cx.v3beta1.IFilterSpecs[]|null); + } + + /** Represents a SearchConfig. */ + class SearchConfig implements ISearchConfig { + + /** + * Constructs a new SearchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ISearchConfig); + + /** SearchConfig boostSpecs. */ + public boostSpecs: google.cloud.dialogflow.cx.v3beta1.IBoostSpecs[]; + + /** SearchConfig filterSpecs. */ + public filterSpecs: google.cloud.dialogflow.cx.v3beta1.IFilterSpecs[]; + + /** + * Creates a new SearchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ISearchConfig): google.cloud.dialogflow.cx.v3beta1.SearchConfig; + + /** + * Encodes the specified SearchConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SearchConfig.verify|verify} messages. + * @param message SearchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ISearchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SearchConfig.verify|verify} messages. + * @param message SearchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ISearchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.SearchConfig; + + /** + * Decodes a SearchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.SearchConfig; + + /** + * Verifies a SearchConfig 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 SearchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.SearchConfig; + + /** + * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. + * @param message SearchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.SearchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoostSpec. */ + interface IBoostSpec { + + /** BoostSpec conditionBoostSpecs */ + conditionBoostSpecs?: (google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec[]|null); + } + + /** Represents a BoostSpec. */ + class BoostSpec implements IBoostSpec { + + /** + * Constructs a new BoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IBoostSpec); + + /** BoostSpec conditionBoostSpecs. */ + public conditionBoostSpecs: google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec[]; + + /** + * Creates a new BoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns BoostSpec instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IBoostSpec): google.cloud.dialogflow.cx.v3beta1.BoostSpec; + + /** + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.BoostSpec; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.BoostSpec; + + /** + * Verifies a BoostSpec 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 BoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.BoostSpec; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @param message BoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.BoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BoostSpec { + + /** Properties of a ConditionBoostSpec. */ + interface IConditionBoostSpec { + + /** ConditionBoostSpec condition */ + condition?: (string|null); + + /** ConditionBoostSpec boost */ + boost?: (number|null); + } + + /** Represents a ConditionBoostSpec. */ + class ConditionBoostSpec implements IConditionBoostSpec { + + /** + * Constructs a new ConditionBoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec); + + /** ConditionBoostSpec condition. */ + public condition: string; + + /** ConditionBoostSpec boost. */ + public boost: number; + + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ConditionBoostSpec instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec): google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec; + + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec; + + /** + * Verifies a ConditionBoostSpec 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 ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConditionBoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec; + + /** + * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. + * @param message ConditionBoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConditionBoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConditionBoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BoostSpecs. */ + interface IBoostSpecs { + + /** BoostSpecs dataStores */ + dataStores?: (string[]|null); + + /** BoostSpecs spec */ + spec?: (google.cloud.dialogflow.cx.v3beta1.IBoostSpec[]|null); + } + + /** Represents a BoostSpecs. */ + class BoostSpecs implements IBoostSpecs { + + /** + * Constructs a new BoostSpecs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IBoostSpecs); + + /** BoostSpecs dataStores. */ + public dataStores: string[]; + + /** BoostSpecs spec. */ + public spec: google.cloud.dialogflow.cx.v3beta1.IBoostSpec[]; + + /** + * Creates a new BoostSpecs instance using the specified properties. + * @param [properties] Properties to set + * @returns BoostSpecs instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IBoostSpecs): google.cloud.dialogflow.cx.v3beta1.BoostSpecs; + + /** + * Encodes the specified BoostSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpecs.verify|verify} messages. + * @param message BoostSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IBoostSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoostSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpecs.verify|verify} messages. + * @param message BoostSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IBoostSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoostSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.BoostSpecs; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoostSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.BoostSpecs; + + /** + * Verifies a BoostSpecs 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 BoostSpecs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoostSpecs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.BoostSpecs; + + /** + * Creates a plain object from a BoostSpecs message. Also converts values to other types if specified. + * @param message BoostSpecs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.BoostSpecs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoostSpecs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoostSpecs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterSpecs. */ + interface IFilterSpecs { + + /** FilterSpecs dataStores */ + dataStores?: (string[]|null); + + /** FilterSpecs filter */ + filter?: (string|null); + } + + /** Represents a FilterSpecs. */ + class FilterSpecs implements IFilterSpecs { + + /** + * Constructs a new FilterSpecs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IFilterSpecs); + + /** FilterSpecs dataStores. */ + public dataStores: string[]; + + /** FilterSpecs filter. */ + public filter: string; + + /** + * Creates a new FilterSpecs instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterSpecs instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IFilterSpecs): google.cloud.dialogflow.cx.v3beta1.FilterSpecs; + + /** + * Encodes the specified FilterSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FilterSpecs.verify|verify} messages. + * @param message FilterSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IFilterSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FilterSpecs.verify|verify} messages. + * @param message FilterSpecs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IFilterSpecs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.FilterSpecs; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterSpecs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.FilterSpecs; + + /** + * Verifies a FilterSpecs 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 FilterSpecs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterSpecs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.FilterSpecs; + + /** + * Creates a plain object from a FilterSpecs message. Also converts values to other types if specified. + * @param message FilterSpecs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.FilterSpecs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterSpecs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterSpecs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a QueryInput. */ interface IQueryInput { @@ -56566,6 +59849,9 @@ export namespace google { /** QueryResult advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + + /** QueryResult allowAnswerFeedback */ + allowAnswerFeedback?: (boolean|null); } /** Represents a QueryResult. */ @@ -56628,6 +59914,9 @@ export namespace google { /** QueryResult advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); + /** QueryResult allowAnswerFeedback. */ + public allowAnswerFeedback: boolean; + /** QueryResult query. */ public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmf"); @@ -63049,1448 +66338,2537 @@ export namespace google { /** Properties of a VersionVariants. */ interface IVersionVariants { - /** VersionVariants variants */ - variants?: (google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]|null); + /** VersionVariants variants */ + variants?: (google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]|null); + } + + /** Represents a VersionVariants. */ + class VersionVariants implements IVersionVariants { + + /** + * Constructs a new VersionVariants. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants); + + /** VersionVariants variants. */ + public variants: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]; + + /** + * Creates a new VersionVariants instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionVariants instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants): google.cloud.dialogflow.cx.v3beta1.VersionVariants; + + /** + * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.v3beta1.VersionVariants; + + /** + * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v3beta1.VersionVariants; + + /** + * 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 VersionVariants message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionVariants + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VersionVariants; + + /** + * 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.v3beta1.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersionVariants to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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.v3beta1.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.v3beta1.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; + + /** + * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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 RolloutConfig. */ + interface IRolloutConfig { + + /** RolloutConfig rolloutSteps */ + rolloutSteps?: (google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep[]|null); + + /** RolloutConfig rolloutCondition */ + rolloutCondition?: (string|null); + + /** RolloutConfig failureCondition */ + failureCondition?: (string|null); + } + + /** Represents a RolloutConfig. */ + class RolloutConfig implements IRolloutConfig { + + /** + * Constructs a new RolloutConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutConfig); + + /** RolloutConfig rolloutSteps. */ + public rolloutSteps: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep[]; + + /** RolloutConfig rolloutCondition. */ + public rolloutCondition: string; + + /** RolloutConfig failureCondition. */ + public failureCondition: string; + + /** + * Creates a new RolloutConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RolloutConfig instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutConfig): google.cloud.dialogflow.cx.v3beta1.RolloutConfig; + + /** + * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.v3beta1.RolloutConfig; + + /** + * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v3beta1.RolloutConfig; + + /** + * 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 RolloutConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RolloutConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RolloutConfig; + + /** + * 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.v3beta1.RolloutConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RolloutConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + 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.v3beta1.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.v3beta1.RolloutConfig.IRolloutStep): google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep; + + /** + * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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); + + /** RolloutState startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RolloutState. */ + class RolloutState implements IRolloutState { + + /** + * Constructs a new RolloutState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutState); + + /** RolloutState step. */ + public step: string; + + /** RolloutState stepIndex. */ + public stepIndex: number; + + /** RolloutState startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RolloutState instance using the specified properties. + * @param [properties] Properties to set + * @returns RolloutState instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutState): google.cloud.dialogflow.cx.v3beta1.RolloutState; + + /** + * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.v3beta1.RolloutState; + + /** + * Decodes a RolloutState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v3beta1.RolloutState; + + /** + * 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 RolloutState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RolloutState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RolloutState; + + /** + * 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.v3beta1.RolloutState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RolloutState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 a VariantsHistory. */ + interface IVariantsHistory { + + /** VariantsHistory versionVariants */ + versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + + /** VariantsHistory updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VariantsHistory. */ + class VariantsHistory implements IVariantsHistory { + + /** + * Constructs a new VariantsHistory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory); + + /** VariantsHistory versionVariants. */ + public versionVariants?: (google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVariantsHistory): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.v3beta1.VariantsHistory; + + /** + * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v3beta1.VariantsHistory; + + /** + * 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 VariantsHistory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VariantsHistory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + + /** + * 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.v3beta1.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VariantsHistory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 ListExperimentsRequest. */ + interface IListExperimentsRequest { + + /** ListExperimentsRequest parent */ + parent?: (string|null); + + /** ListExperimentsRequest pageSize */ + pageSize?: (number|null); + + /** ListExperimentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListExperimentsRequest. */ + class ListExperimentsRequest implements IListExperimentsRequest { + + /** + * Constructs a new ListExperimentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest); + + /** ListExperimentsRequest parent. */ + public parent: string; + + /** ListExperimentsRequest pageSize. */ + public pageSize: number; + + /** ListExperimentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListExperimentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListExperimentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; + + /** + * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.v3beta1.ListExperimentsRequest; + + /** + * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.IListExperimentsResponse); + + /** ListExperimentsResponse experiments. */ + public experiments: google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsResponse): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; + + /** + * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.IGetExperimentRequest): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; + + /** + * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.IExperiment|null); + } + + /** Represents a CreateExperimentRequest. */ + class CreateExperimentRequest implements ICreateExperimentRequest { + + /** + * Constructs a new CreateExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest); + + /** CreateExperimentRequest parent. */ + public parent: string; + + /** CreateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; + + /** + * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.IExperiment|null); + + /** UpdateExperimentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a VersionVariants. */ - class VersionVariants implements IVersionVariants { + /** Represents an UpdateExperimentRequest. */ + class UpdateExperimentRequest implements IUpdateExperimentRequest { /** - * Constructs a new VersionVariants. + * Constructs a new UpdateExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest); - /** VersionVariants variants. */ - public variants: google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant[]; + /** UpdateExperimentRequest experiment. */ + public experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); + + /** UpdateExperimentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new VersionVariants instance using the specified properties. + * Creates a new UpdateExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VersionVariants instance + * @returns UpdateExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVersionVariants): google.cloud.dialogflow.cx.v3beta1.VersionVariants; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. - * @param message VersionVariants message or plain object to encode + * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. - * @param message VersionVariants message or plain object to encode + * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VersionVariants message from the specified reader or buffer. + * 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 VersionVariants + * @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.v3beta1.VersionVariants; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VersionVariants + * @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.v3beta1.VersionVariants; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Verifies a VersionVariants message. + * 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 a VersionVariants message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VersionVariants + * @returns UpdateExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VersionVariants; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; /** - * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. - * @param message VersionVariants + * 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.v3beta1.VersionVariants, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VersionVariants to JSON. + * Converts this UpdateExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VersionVariants + * 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; } - 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.v3beta1.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.v3beta1.VersionVariants.IVariant): google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant; - - /** - * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.IVariant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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 RolloutConfig. */ - interface IRolloutConfig { - - /** RolloutConfig rolloutSteps */ - rolloutSteps?: (google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep[]|null); - - /** RolloutConfig rolloutCondition */ - rolloutCondition?: (string|null); + /** Properties of a DeleteExperimentRequest. */ + interface IDeleteExperimentRequest { - /** RolloutConfig failureCondition */ - failureCondition?: (string|null); + /** DeleteExperimentRequest name */ + name?: (string|null); } - /** Represents a RolloutConfig. */ - class RolloutConfig implements IRolloutConfig { + /** Represents a DeleteExperimentRequest. */ + class DeleteExperimentRequest implements IDeleteExperimentRequest { /** - * Constructs a new RolloutConfig. + * Constructs a new DeleteExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutConfig); - - /** RolloutConfig rolloutSteps. */ - public rolloutSteps: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep[]; - - /** RolloutConfig rolloutCondition. */ - public rolloutCondition: string; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest); - /** RolloutConfig failureCondition. */ - public failureCondition: string; + /** DeleteExperimentRequest name. */ + public name: string; /** - * Creates a new RolloutConfig instance using the specified properties. + * Creates a new DeleteExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RolloutConfig instance + * @returns DeleteExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutConfig): google.cloud.dialogflow.cx.v3beta1.RolloutConfig; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.verify|verify} messages. - * @param message RolloutConfig message or plain object to encode + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.verify|verify} messages. - * @param message RolloutConfig message or plain object to encode + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RolloutConfig message from the specified reader or buffer. + * 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 RolloutConfig + * @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.v3beta1.RolloutConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RolloutConfig + * @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.v3beta1.RolloutConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Verifies a RolloutConfig message. + * 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 RolloutConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RolloutConfig + * @returns DeleteExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RolloutConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; /** - * Creates a plain object from a RolloutConfig message. Also converts values to other types if specified. - * @param message RolloutConfig + * 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.v3beta1.RolloutConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RolloutConfig to JSON. + * Converts this DeleteExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RolloutConfig + * 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; } - 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 { + /** Properties of a StartExperimentRequest. */ + interface IStartExperimentRequest { - /** - * Constructs a new RolloutStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep); + /** StartExperimentRequest name */ + name?: (string|null); + } - /** RolloutStep displayName. */ - public displayName: string; + /** Represents a StartExperimentRequest. */ + class StartExperimentRequest implements IStartExperimentRequest { - /** RolloutStep trafficPercent. */ - public trafficPercent: number; + /** + * Constructs a new StartExperimentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest); - /** RolloutStep minDuration. */ - public minDuration?: (google.protobuf.IDuration|null); + /** StartExperimentRequest name. */ + public name: string; - /** - * 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.v3beta1.RolloutConfig.IRolloutStep): google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep; + /** + * 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.v3beta1.IStartExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; - /** - * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.IRolloutStep, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStartExperimentRequest, 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.v3beta1.RolloutConfig.RolloutStep; + /** + * 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.v3beta1.StartExperimentRequest; - /** - * 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.v3beta1.RolloutConfig.RolloutStep; + /** + * 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.v3beta1.StartExperimentRequest; - /** - * 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); + /** + * 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 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.v3beta1.RolloutConfig.RolloutStep; + /** + * 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.v3beta1.StartExperimentRequest; - /** - * 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.v3beta1.RolloutConfig.RolloutStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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.v3beta1.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this RolloutStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this StartExperimentRequest 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; - } + /** + * 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 RolloutState. */ - interface IRolloutState { - - /** RolloutState step */ - step?: (string|null); - - /** RolloutState stepIndex */ - stepIndex?: (number|null); + /** Properties of a StopExperimentRequest. */ + interface IStopExperimentRequest { - /** RolloutState startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** StopExperimentRequest name */ + name?: (string|null); } - /** Represents a RolloutState. */ - class RolloutState implements IRolloutState { + /** Represents a StopExperimentRequest. */ + class StopExperimentRequest implements IStopExperimentRequest { /** - * Constructs a new RolloutState. + * Constructs a new StopExperimentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutState); - - /** RolloutState step. */ - public step: string; - - /** RolloutState stepIndex. */ - public stepIndex: number; + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest); - /** RolloutState startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** StopExperimentRequest name. */ + public name: string; /** - * Creates a new RolloutState instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RolloutState instance + * @returns StopExperimentRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IRolloutState): google.cloud.dialogflow.cx.v3beta1.RolloutState; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Encodes the specified RolloutState message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutState.verify|verify} messages. - * @param message RolloutState message or plain object to encode + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RolloutState message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutState.verify|verify} messages. - * @param message RolloutState message or plain object to encode + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IRolloutState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RolloutState message from the specified reader or buffer. + * 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 RolloutState + * @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.v3beta1.RolloutState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Decodes a RolloutState message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RolloutState + * @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.v3beta1.RolloutState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * Verifies a RolloutState message. + * 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 RolloutState message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RolloutState + * @returns StopExperimentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.RolloutState; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; /** - * 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 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.v3beta1.RolloutState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RolloutState to JSON. + * Converts this StopExperimentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RolloutState + * 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; } - /** Properties of a VariantsHistory. */ - interface IVariantsHistory { + /** Represents a Generators */ + class Generators extends $protobuf.rpc.Service { - /** VariantsHistory versionVariants */ - versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + /** + * 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); - /** VariantsHistory updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * 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; - /** Represents a VariantsHistory. */ - class VariantsHistory implements IVariantsHistory { + /** + * 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.v3beta1.IListGeneratorsRequest, callback: google.cloud.dialogflow.cx.v3beta1.Generators.ListGeneratorsCallback): void; /** - * Constructs a new VariantsHistory. - * @param [properties] Properties to set + * Calls ListGenerators. + * @param request ListGeneratorsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory); + public listGenerators(request: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest): Promise; - /** VariantsHistory versionVariants. */ - public versionVariants?: (google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null); + /** + * 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.v3beta1.IGetGeneratorRequest, callback: google.cloud.dialogflow.cx.v3beta1.Generators.GetGeneratorCallback): void; - /** VariantsHistory updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Calls GetGenerator. + * @param request GetGeneratorRequest message or plain object + * @returns Promise + */ + public getGenerator(request: google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest): Promise; - /** VariantsHistory variants. */ - public variants?: "versionVariants"; + /** + * 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.v3beta1.ICreateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3beta1.Generators.CreateGeneratorCallback): void; /** - * Creates a new VariantsHistory instance using the specified properties. - * @param [properties] Properties to set - * @returns VariantsHistory instance + * Calls CreateGenerator. + * @param request CreateGeneratorRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + public createGenerator(request: google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest): Promise; /** - * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. - * @param message VariantsHistory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Generator */ - public static encode(message: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public updateGenerator(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, callback: google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGeneratorCallback): void; /** - * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. - * @param message VariantsHistory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateGenerator. + * @param request UpdateGeneratorRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IVariantsHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public updateGenerator(request: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest): Promise; /** - * 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 VariantsHistory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + public deleteGenerator(request: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, callback: google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGeneratorCallback): void; /** - * Decodes a VariantsHistory message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VariantsHistory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteGenerator. + * @param request DeleteGeneratorRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + public deleteGenerator(request: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest): Promise; + } + + namespace Generators { /** - * Verifies a VariantsHistory message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|listGenerators}. + * @param error Error, if any + * @param [response] ListGeneratorsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListGeneratorsCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse) => void; /** - * Creates a VariantsHistory message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VariantsHistory + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|getGenerator}. + * @param error Error, if any + * @param [response] Generator */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.VariantsHistory; + type GetGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Generator) => void; /** - * 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 + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|createGenerator}. + * @param error Error, if any + * @param [response] Generator */ - public static toObject(message: google.cloud.dialogflow.cx.v3beta1.VariantsHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type CreateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Generator) => void; /** - * Converts this VariantsHistory to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|updateGenerator}. + * @param error Error, if any + * @param [response] Generator */ - public toJSON(): { [k: string]: any }; + type UpdateGeneratorCallback = (error: (Error|null), response?: google.cloud.dialogflow.cx.v3beta1.Generator) => void; /** - * Gets the default type url for VariantsHistory - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|deleteGenerator}. + * @param error Error, if any + * @param [response] Empty */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type DeleteGeneratorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a ListExperimentsRequest. */ - interface IListExperimentsRequest { + /** Properties of a Generator. */ + interface IGenerator { - /** ListExperimentsRequest parent */ - parent?: (string|null); + /** Generator name */ + name?: (string|null); - /** ListExperimentsRequest pageSize */ - pageSize?: (number|null); + /** Generator displayName */ + displayName?: (string|null); - /** ListExperimentsRequest pageToken */ - pageToken?: (string|null); + /** Generator promptText */ + promptText?: (google.cloud.dialogflow.cx.v3beta1.IPhrase|null); + + /** Generator placeholders */ + placeholders?: (google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder[]|null); } - /** Represents a ListExperimentsRequest. */ - class ListExperimentsRequest implements IListExperimentsRequest { + /** Represents a Generator. */ + class Generator implements IGenerator { /** - * Constructs a new ListExperimentsRequest. + * Constructs a new Generator. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGenerator); - /** ListExperimentsRequest parent. */ - public parent: string; + /** Generator name. */ + public name: string; - /** ListExperimentsRequest pageSize. */ - public pageSize: number; + /** Generator displayName. */ + public displayName: string; - /** ListExperimentsRequest pageToken. */ - public pageToken: string; + /** Generator promptText. */ + public promptText?: (google.cloud.dialogflow.cx.v3beta1.IPhrase|null); + + /** Generator placeholders. */ + public placeholders: google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder[]; /** - * Creates a new ListExperimentsRequest instance using the specified properties. + * Creates a new Generator instance using the specified properties. * @param [properties] Properties to set - * @returns ListExperimentsRequest instance + * @returns Generator instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGenerator): google.cloud.dialogflow.cx.v3beta1.Generator; /** - * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. - * @param message ListExperimentsRequest message or plain object to encode + * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. - * @param message ListExperimentsRequest message or plain object to encode + * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGenerator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer. + * 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 ListExperimentsRequest + * @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.v3beta1.ListExperimentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Generator; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. + * Decodes a Generator message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExperimentsRequest + * @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.v3beta1.ListExperimentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Generator; /** - * Verifies a ListExperimentsRequest message. + * 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 ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Generator message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListExperimentsRequest + * @returns Generator */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Generator; /** - * 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 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.v3beta1.ListExperimentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Generator, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExperimentsRequest to JSON. + * Converts this Generator to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListExperimentsRequest + * 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; } - /** Properties of a ListExperimentsResponse. */ - interface IListExperimentsResponse { + namespace Generator { - /** ListExperimentsResponse experiments */ - experiments?: (google.cloud.dialogflow.cx.v3beta1.IExperiment[]|null); + /** Properties of a Placeholder. */ + interface IPlaceholder { - /** ListExperimentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** 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.v3beta1.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.v3beta1.Generator.IPlaceholder): google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder; + + /** + * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generator.IPlaceholder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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; + } } - /** Represents a ListExperimentsResponse. */ - class ListExperimentsResponse implements IListExperimentsResponse { + /** Properties of a Phrase. */ + interface IPhrase { + + /** Phrase text */ + text?: (string|null); + } + + /** Represents a Phrase. */ + class Phrase implements IPhrase { /** - * Constructs a new ListExperimentsResponse. + * Constructs a new Phrase. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IPhrase); - /** ListExperimentsResponse experiments. */ - public experiments: google.cloud.dialogflow.cx.v3beta1.IExperiment[]; - - /** ListExperimentsResponse nextPageToken. */ - public nextPageToken: string; + /** Phrase text. */ + public text: string; /** - * Creates a new ListExperimentsResponse instance using the specified properties. + * Creates a new Phrase instance using the specified properties. * @param [properties] Properties to set - * @returns ListExperimentsResponse instance + * @returns Phrase instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IPhrase): google.cloud.dialogflow.cx.v3beta1.Phrase; /** - * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. - * @param message ListExperimentsResponse message or plain object to encode + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. - * @param message ListExperimentsResponse message or plain object to encode + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IListExperimentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IPhrase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer. + * 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 ListExperimentsResponse + * @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.v3beta1.ListExperimentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.Phrase; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. + * Decodes a Phrase message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListExperimentsResponse + * @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.v3beta1.ListExperimentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.Phrase; /** - * Verifies a ListExperimentsResponse message. + * 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 ListExperimentsResponse 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. * @param object Plain object - * @returns ListExperimentsResponse + * @returns Phrase */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.Phrase; /** - * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. - * @param message ListExperimentsResponse + * 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.v3beta1.ListExperimentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.Phrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListExperimentsResponse to JSON. + * Converts this Phrase to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListExperimentsResponse + * 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 GetExperimentRequest. */ - interface IGetExperimentRequest { + /** Properties of a ListGeneratorsRequest. */ + interface IListGeneratorsRequest { - /** GetExperimentRequest name */ - name?: (string|null); + /** ListGeneratorsRequest parent */ + parent?: (string|null); + + /** ListGeneratorsRequest languageCode */ + languageCode?: (string|null); + + /** ListGeneratorsRequest pageSize */ + pageSize?: (number|null); + + /** ListGeneratorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetExperimentRequest. */ - class GetExperimentRequest implements IGetExperimentRequest { + /** Represents a ListGeneratorsRequest. */ + class ListGeneratorsRequest implements IListGeneratorsRequest { /** - * Constructs a new GetExperimentRequest. + * Constructs a new ListGeneratorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest); - /** GetExperimentRequest name. */ - public name: string; + /** ListGeneratorsRequest parent. */ + public parent: string; + + /** ListGeneratorsRequest languageCode. */ + public languageCode: string; + + /** ListGeneratorsRequest pageSize. */ + public pageSize: number; + + /** ListGeneratorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetExperimentRequest instance using the specified properties. + * Creates a new ListGeneratorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetExperimentRequest instance + * @returns ListGeneratorsRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest; /** - * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. - * @param message GetExperimentRequest message or plain object to encode + * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. - * @param message GetExperimentRequest message or plain object to encode + * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IGetExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer. + * 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 GetExperimentRequest + * @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.v3beta1.GetExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetExperimentRequest + * @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.v3beta1.GetExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest; /** - * Verifies a GetExperimentRequest message. + * 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 GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetExperimentRequest + * @returns ListGeneratorsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest; /** - * 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 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.v3beta1.GetExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetExperimentRequest to JSON. + * Converts this ListGeneratorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetExperimentRequest + * 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 CreateExperimentRequest. */ - interface ICreateExperimentRequest { + /** Properties of a ListGeneratorsResponse. */ + interface IListGeneratorsResponse { - /** CreateExperimentRequest parent */ - parent?: (string|null); + /** ListGeneratorsResponse generators */ + generators?: (google.cloud.dialogflow.cx.v3beta1.IGenerator[]|null); - /** CreateExperimentRequest experiment */ - experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); + /** ListGeneratorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateExperimentRequest. */ - class CreateExperimentRequest implements ICreateExperimentRequest { + /** Represents a ListGeneratorsResponse. */ + class ListGeneratorsResponse implements IListGeneratorsResponse { /** - * Constructs a new CreateExperimentRequest. + * Constructs a new ListGeneratorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse); - /** CreateExperimentRequest parent. */ - public parent: string; + /** ListGeneratorsResponse generators. */ + public generators: google.cloud.dialogflow.cx.v3beta1.IGenerator[]; - /** CreateExperimentRequest experiment. */ - public experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); + /** ListGeneratorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateExperimentRequest instance using the specified properties. + * Creates a new ListGeneratorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateExperimentRequest instance + * @returns ListGeneratorsResponse instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse; /** - * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. - * @param message CreateExperimentRequest message or plain object to encode + * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. - * @param message CreateExperimentRequest message or plain object to encode + * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ICreateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * 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 CreateExperimentRequest + * @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.v3beta1.CreateExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateExperimentRequest + * @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.v3beta1.CreateExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse; /** - * Verifies a CreateExperimentRequest message. + * 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 CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateExperimentRequest + * @returns ListGeneratorsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse; /** - * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. - * @param message CreateExperimentRequest + * 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.v3beta1.CreateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateExperimentRequest to JSON. + * Converts this ListGeneratorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateExperimentRequest + * 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 an UpdateExperimentRequest. */ - interface IUpdateExperimentRequest { + /** Properties of a GetGeneratorRequest. */ + interface IGetGeneratorRequest { - /** UpdateExperimentRequest experiment */ - experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); + /** GetGeneratorRequest name */ + name?: (string|null); - /** UpdateExperimentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetGeneratorRequest languageCode */ + languageCode?: (string|null); } - /** Represents an UpdateExperimentRequest. */ - class UpdateExperimentRequest implements IUpdateExperimentRequest { + /** Represents a GetGeneratorRequest. */ + class GetGeneratorRequest implements IGetGeneratorRequest { /** - * Constructs a new UpdateExperimentRequest. + * Constructs a new GetGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest); - /** UpdateExperimentRequest experiment. */ - public experiment?: (google.cloud.dialogflow.cx.v3beta1.IExperiment|null); + /** GetGeneratorRequest name. */ + public name: string; - /** UpdateExperimentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetGeneratorRequest languageCode. */ + public languageCode: string; /** - * Creates a new UpdateExperimentRequest instance using the specified properties. + * Creates a new GetGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateExperimentRequest instance + * @returns GetGeneratorRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest): google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest; /** - * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. - * @param message UpdateExperimentRequest message or plain object to encode + * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. - * @param message UpdateExperimentRequest message or plain object to encode + * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IUpdateExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * 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 UpdateExperimentRequest + * @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.v3beta1.UpdateExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateExperimentRequest + * @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.v3beta1.UpdateExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest; /** - * Verifies an UpdateExperimentRequest message. + * 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 an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateExperimentRequest + * @returns GetGeneratorRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest; /** - * 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 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.v3beta1.UpdateExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateExperimentRequest to JSON. + * Converts this GetGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateExperimentRequest + * 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 DeleteExperimentRequest. */ - interface IDeleteExperimentRequest { + /** Properties of a CreateGeneratorRequest. */ + interface ICreateGeneratorRequest { - /** DeleteExperimentRequest name */ - name?: (string|null); + /** CreateGeneratorRequest parent */ + parent?: (string|null); + + /** CreateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3beta1.IGenerator|null); + + /** CreateGeneratorRequest languageCode */ + languageCode?: (string|null); } - /** Represents a DeleteExperimentRequest. */ - class DeleteExperimentRequest implements IDeleteExperimentRequest { + /** Represents a CreateGeneratorRequest. */ + class CreateGeneratorRequest implements ICreateGeneratorRequest { /** - * Constructs a new DeleteExperimentRequest. + * Constructs a new CreateGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest); - /** DeleteExperimentRequest name. */ - public name: string; + /** CreateGeneratorRequest parent. */ + public parent: string; + + /** CreateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3beta1.IGenerator|null); + + /** CreateGeneratorRequest languageCode. */ + public languageCode: string; /** - * Creates a new DeleteExperimentRequest instance using the specified properties. + * Creates a new CreateGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteExperimentRequest instance + * @returns CreateGeneratorRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest): google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest; /** - * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. - * @param message DeleteExperimentRequest message or plain object to encode + * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. - * @param message DeleteExperimentRequest message or plain object to encode + * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IDeleteExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * 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 DeleteExperimentRequest + * @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.v3beta1.DeleteExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest; /** - * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteExperimentRequest + * @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.v3beta1.DeleteExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest; /** - * Verifies a DeleteExperimentRequest message. + * 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 DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteExperimentRequest + * @returns CreateGeneratorRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest; /** - * 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 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.v3beta1.DeleteExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteExperimentRequest to JSON. + * Converts this CreateGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteExperimentRequest + * 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 a StartExperimentRequest. */ - interface IStartExperimentRequest { + /** Properties of an UpdateGeneratorRequest. */ + interface IUpdateGeneratorRequest { - /** StartExperimentRequest name */ - name?: (string|null); + /** UpdateGeneratorRequest generator */ + generator?: (google.cloud.dialogflow.cx.v3beta1.IGenerator|null); + + /** UpdateGeneratorRequest languageCode */ + languageCode?: (string|null); + + /** UpdateGeneratorRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a StartExperimentRequest. */ - class StartExperimentRequest implements IStartExperimentRequest { + /** Represents an UpdateGeneratorRequest. */ + class UpdateGeneratorRequest implements IUpdateGeneratorRequest { /** - * Constructs a new StartExperimentRequest. + * Constructs a new UpdateGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest); - /** StartExperimentRequest name. */ - public name: string; + /** UpdateGeneratorRequest generator. */ + public generator?: (google.cloud.dialogflow.cx.v3beta1.IGenerator|null); + + /** UpdateGeneratorRequest languageCode. */ + public languageCode: string; + + /** UpdateGeneratorRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new StartExperimentRequest instance using the specified properties. + * Creates a new UpdateGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StartExperimentRequest instance + * @returns UpdateGeneratorRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest): google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest; /** - * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. - * @param message StartExperimentRequest message or plain object to encode + * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. - * @param message StartExperimentRequest message or plain object to encode + * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStartExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer. + * 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 StartExperimentRequest + * @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.v3beta1.StartExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StartExperimentRequest + * @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.v3beta1.StartExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest; /** - * Verifies a StartExperimentRequest message. + * 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 a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StartExperimentRequest + * @returns UpdateGeneratorRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest; /** - * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. - * @param message StartExperimentRequest + * 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.v3beta1.StartExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StartExperimentRequest to JSON. + * Converts this UpdateGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StartExperimentRequest + * 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 StopExperimentRequest. */ - interface IStopExperimentRequest { + /** Properties of a DeleteGeneratorRequest. */ + interface IDeleteGeneratorRequest { - /** StopExperimentRequest name */ + /** DeleteGeneratorRequest name */ name?: (string|null); + + /** DeleteGeneratorRequest force */ + force?: (boolean|null); } - /** Represents a StopExperimentRequest. */ - class StopExperimentRequest implements IStopExperimentRequest { + /** Represents a DeleteGeneratorRequest. */ + class DeleteGeneratorRequest implements IDeleteGeneratorRequest { /** - * Constructs a new StopExperimentRequest. + * Constructs a new DeleteGeneratorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest); + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest); - /** StopExperimentRequest name. */ + /** DeleteGeneratorRequest name. */ public name: string; + /** DeleteGeneratorRequest force. */ + public force: boolean; + /** - * Creates a new StopExperimentRequest instance using the specified properties. + * Creates a new DeleteGeneratorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StopExperimentRequest instance + * @returns DeleteGeneratorRequest instance */ - public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest): google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest; /** - * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. - * @param message StopExperimentRequest message or plain object to encode + * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. - * @param message StopExperimentRequest message or plain object to encode + * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IStopExperimentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer. + * 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 StopExperimentRequest + * @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.v3beta1.StopExperimentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopExperimentRequest + * @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.v3beta1.StopExperimentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest; /** - * Verifies a StopExperimentRequest message. + * 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 StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopExperimentRequest + * @returns DeleteGeneratorRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest; /** - * 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 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.v3beta1.StopExperimentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopExperimentRequest to JSON. + * Converts this DeleteGeneratorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StopExperimentRequest + * Gets the default type url for DeleteGeneratorRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index b177efc3469..0cbf11742c3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -1644,6 +1644,7 @@ * @property {google.cloud.dialogflow.cx.v3.Agent.IGitIntegrationSettings|null} [gitIntegrationSettings] Agent gitIntegrationSettings * @property {google.cloud.dialogflow.cx.v3.ITextToSpeechSettings|null} [textToSpeechSettings] Agent textToSpeechSettings * @property {google.cloud.dialogflow.cx.v3.Agent.IGenAppBuilderSettings|null} [genAppBuilderSettings] Agent genAppBuilderSettings + * @property {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings|null} [answerFeedbackSettings] Agent answerFeedbackSettings */ /** @@ -1798,6 +1799,14 @@ */ Agent.prototype.genAppBuilderSettings = null; + /** + * Agent answerFeedbackSettings. + * @member {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings|null|undefined} answerFeedbackSettings + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @instance + */ + Agent.prototype.answerFeedbackSettings = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1871,6 +1880,8 @@ $root.google.cloud.dialogflow.cx.v3.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.genAppBuilderSettings != null && Object.hasOwnProperty.call(message, "genAppBuilderSettings")) $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(); return writer; }; @@ -1975,6 +1986,10 @@ message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.decode(reader, reader.uint32()); break; } + case 38: { + message.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2079,6 +2094,11 @@ return "genAppBuilderSettings." + error; } } + if (message.answerFeedbackSettings != null && message.hasOwnProperty("answerFeedbackSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.verify(message.answerFeedbackSettings); + if (error) + return "answerFeedbackSettings." + error; + } return null; }; @@ -2148,6 +2168,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.Agent.genAppBuilderSettings: object expected"); message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3.Agent.GenAppBuilderSettings.fromObject(object.genAppBuilderSettings); } + if (object.answerFeedbackSettings != null) { + if (typeof object.answerFeedbackSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Agent.answerFeedbackSettings: object expected"); + message.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.fromObject(object.answerFeedbackSettings); + } return message; }; @@ -2182,6 +2207,7 @@ object.locked = false; object.gitIntegrationSettings = null; object.textToSpeechSettings = null; + object.answerFeedbackSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -2223,6 +2249,8 @@ if (options.oneofs) object._genAppBuilderSettings = "genAppBuilderSettings"; } + if (message.answerFeedbackSettings != null && message.hasOwnProperty("answerFeedbackSettings")) + object.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.toObject(message.answerFeedbackSettings, options); return object; }; @@ -2995,6 +3023,209 @@ return GenAppBuilderSettings; })(); + Agent.AnswerFeedbackSettings = (function() { + + /** + * Properties of an AnswerFeedbackSettings. + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @interface IAnswerFeedbackSettings + * @property {boolean|null} [enableAnswerFeedback] AnswerFeedbackSettings enableAnswerFeedback + */ + + /** + * Constructs a new AnswerFeedbackSettings. + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @classdesc Represents an AnswerFeedbackSettings. + * @implements IAnswerFeedbackSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings=} [properties] Properties to set + */ + function AnswerFeedbackSettings(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]]; + } + + /** + * AnswerFeedbackSettings enableAnswerFeedback. + * @member {boolean} enableAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @instance + */ + AnswerFeedbackSettings.prototype.enableAnswerFeedback = false; + + /** + * Creates a new AnswerFeedbackSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings instance + */ + AnswerFeedbackSettings.create = function create(properties) { + return new AnswerFeedbackSettings(properties); + }; + + /** + * Encodes the specified AnswerFeedbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings} message AnswerFeedbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedbackSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableAnswerFeedback != null && Object.hasOwnProperty.call(message, "enableAnswerFeedback")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableAnswerFeedback); + return writer; + }; + + /** + * Encodes the specified AnswerFeedbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Agent.IAnswerFeedbackSettings} message AnswerFeedbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedbackSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedbackSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableAnswerFeedback = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedbackSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerFeedbackSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerFeedbackSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableAnswerFeedback != null && message.hasOwnProperty("enableAnswerFeedback")) + if (typeof message.enableAnswerFeedback !== "boolean") + return "enableAnswerFeedback: boolean expected"; + return null; + }; + + /** + * Creates an AnswerFeedbackSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + */ + AnswerFeedbackSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings(); + if (object.enableAnswerFeedback != null) + message.enableAnswerFeedback = Boolean(object.enableAnswerFeedback); + return message; + }; + + /** + * Creates a plain object from an AnswerFeedbackSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings} message AnswerFeedbackSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerFeedbackSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableAnswerFeedback = false; + if (message.enableAnswerFeedback != null && message.hasOwnProperty("enableAnswerFeedback")) + object.enableAnswerFeedback = message.enableAnswerFeedback; + return object; + }; + + /** + * Converts this AnswerFeedbackSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @instance + * @returns {Object.} JSON object + */ + AnswerFeedbackSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnswerFeedbackSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerFeedbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Agent.AnswerFeedbackSettings"; + }; + + return AnswerFeedbackSettings; + })(); + return Agent; })(); @@ -7316,6 +7547,243 @@ return SpeechWordInfo; })(); + v3.BargeInConfig = (function() { + + /** + * Properties of a BargeInConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IBargeInConfig + * @property {google.protobuf.IDuration|null} [noBargeInDuration] BargeInConfig noBargeInDuration + * @property {google.protobuf.IDuration|null} [totalDuration] BargeInConfig totalDuration + */ + + /** + * Constructs a new BargeInConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a BargeInConfig. + * @implements IBargeInConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IBargeInConfig=} [properties] Properties to set + */ + function BargeInConfig(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]]; + } + + /** + * BargeInConfig noBargeInDuration. + * @member {google.protobuf.IDuration|null|undefined} noBargeInDuration + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @instance + */ + BargeInConfig.prototype.noBargeInDuration = null; + + /** + * BargeInConfig totalDuration. + * @member {google.protobuf.IDuration|null|undefined} totalDuration + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @instance + */ + BargeInConfig.prototype.totalDuration = null; + + /** + * Creates a new BargeInConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IBargeInConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.BargeInConfig} BargeInConfig instance + */ + BargeInConfig.create = function create(properties) { + return new BargeInConfig(properties); + }; + + /** + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BargeInConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IBargeInConfig} message BargeInConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BargeInConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noBargeInDuration != null && Object.hasOwnProperty.call(message, "noBargeInDuration")) + $root.google.protobuf.Duration.encode(message.noBargeInDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.totalDuration != null && Object.hasOwnProperty.call(message, "totalDuration")) + $root.google.protobuf.Duration.encode(message.totalDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.BargeInConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.IBargeInConfig} message BargeInConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BargeInConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.BargeInConfig} BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BargeInConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.BargeInConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noBargeInDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.totalDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.BargeInConfig} BargeInConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BargeInConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BargeInConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BargeInConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) { + var error = $root.google.protobuf.Duration.verify(message.noBargeInDuration); + if (error) + return "noBargeInDuration." + error; + } + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) { + var error = $root.google.protobuf.Duration.verify(message.totalDuration); + if (error) + return "totalDuration." + error; + } + return null; + }; + + /** + * Creates a BargeInConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BargeInConfig} BargeInConfig + */ + BargeInConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.BargeInConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.BargeInConfig(); + if (object.noBargeInDuration != null) { + if (typeof object.noBargeInDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BargeInConfig.noBargeInDuration: object expected"); + message.noBargeInDuration = $root.google.protobuf.Duration.fromObject(object.noBargeInDuration); + } + if (object.totalDuration != null) { + if (typeof object.totalDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.BargeInConfig.totalDuration: object expected"); + message.totalDuration = $root.google.protobuf.Duration.fromObject(object.totalDuration); + } + return message; + }; + + /** + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.BargeInConfig} message BargeInConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BargeInConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.noBargeInDuration = null; + object.totalDuration = null; + } + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) + object.noBargeInDuration = $root.google.protobuf.Duration.toObject(message.noBargeInDuration, options); + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) + object.totalDuration = $root.google.protobuf.Duration.toObject(message.totalDuration, options); + return object; + }; + + /** + * Converts this BargeInConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @instance + * @returns {Object.} JSON object + */ + BargeInConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BargeInConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BargeInConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BargeInConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BargeInConfig"; + }; + + return BargeInConfig; + })(); + v3.InputAudioConfig = (function() { /** @@ -7329,6 +7797,7 @@ * @property {string|null} [model] InputAudioConfig model * @property {google.cloud.dialogflow.cx.v3.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @property {google.cloud.dialogflow.cx.v3.IBargeInConfig|null} [bargeInConfig] InputAudioConfig bargeInConfig */ /** @@ -7403,6 +7872,14 @@ */ InputAudioConfig.prototype.singleUtterance = false; + /** + * InputAudioConfig bargeInConfig. + * @member {google.cloud.dialogflow.cx.v3.IBargeInConfig|null|undefined} bargeInConfig + * @memberof google.cloud.dialogflow.cx.v3.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.bargeInConfig = null; + /** * Creates a new InputAudioConfig instance using the specified properties. * @function create @@ -7442,6 +7919,8 @@ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.bargeInConfig != null && Object.hasOwnProperty.call(message, "bargeInConfig")) + $root.google.cloud.dialogflow.cx.v3.BargeInConfig.encode(message.bargeInConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; @@ -7506,6 +7985,10 @@ message.singleUtterance = reader.bool(); break; } + case 15: { + message.bargeInConfig = $root.google.cloud.dialogflow.cx.v3.BargeInConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7584,6 +8067,11 @@ if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) if (typeof message.singleUtterance !== "boolean") return "singleUtterance: boolean expected"; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3.BargeInConfig.verify(message.bargeInConfig); + if (error) + return "bargeInConfig." + error; + } return null; }; @@ -7678,6 +8166,11 @@ } if (object.singleUtterance != null) message.singleUtterance = Boolean(object.singleUtterance); + if (object.bargeInConfig != null) { + if (typeof object.bargeInConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.InputAudioConfig.bargeInConfig: object expected"); + message.bargeInConfig = $root.google.cloud.dialogflow.cx.v3.BargeInConfig.fromObject(object.bargeInConfig); + } return message; }; @@ -7703,6 +8196,7 @@ object.singleUtterance = false; object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; object.enableWordInfo = false; + object.bargeInConfig = null; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] : message.audioEncoding; @@ -7721,6 +8215,8 @@ object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] : message.modelVariant; if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) object.enableWordInfo = message.enableWordInfo; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) + object.bargeInConfig = $root.google.cloud.dialogflow.cx.v3.BargeInConfig.toObject(message.bargeInConfig, options); return object; }; @@ -27351,39 +27847,6 @@ return new this(rpcImpl, requestDelimited, responseDelimited); }; - /** - * 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|getEntityType}. * @memberof google.cloud.dialogflow.cx.v3.EntityTypes @@ -27516,6 +27979,39 @@ * @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 + */ + return EntityTypes; })(); @@ -51745,9 +52241,863 @@ * @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 = ""; + + /** + * 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) { + if (!(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(); + switch (tag >>> 3) { + case 1: { + message.rating = reader.int32(); + break; + } + case 2: { + message.ratingReason = $root.google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason.decode(reader, reader.uint32()); + break; + } + case 3: { + message.customRating = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + /** + * 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; + })(); + + AnswerFeedback.RatingReason = (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 + */ + + /** + * 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]]; + } + + /** + * RatingReason reasonLabels. + * @member {Array.} reasonLabels + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.reasonLabels = $util.emptyArray; + + /** + * RatingReason feedback. + * @member {string} feedback + * @memberof google.cloud.dialogflow.cx.v3.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.feedback = ""; + + /** + * 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) { + if (!(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(); + 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); + }; + + /** + * 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.SubmitAnswerFeedbackRequest + * @static + * @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 + */ + SubmitAnswerFeedbackRequest.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(); + return writer; + }; + + /** + * 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.SubmitAnswerFeedbackRequest + * @static + * @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 + */ + SubmitAnswerFeedbackRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. + * @function decode + * @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.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @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) { + if (!(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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.session = reader.string(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitAnswerFeedbackRequest message. + * @function verify + * @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 + */ + SubmitAnswerFeedbackRequest.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; + } + return null; + }; + + /** + * Creates a SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + */ + 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.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); + } + return message; + }; + + /** + * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitAnswerFeedbackRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 SubmitAnswerFeedbackRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitAnswerFeedbackRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitAnswerFeedbackRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitAnswerFeedbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest"; + }; + + return SubmitAnswerFeedbackRequest; + })(); + v3.DetectIntentRequest = (function() { /** @@ -54205,6 +55555,8 @@ * @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 */ /** @@ -54321,6 +55673,22 @@ */ 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; + /** * Creates a new QueryParameters instance using the specified properties. * @function create @@ -54372,6 +55740,10 @@ 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(); return writer; }; @@ -54477,6 +55849,14 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -54571,6 +55951,16 @@ 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; + } return null; }; @@ -54640,6 +56030,16 @@ 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); + } return message; }; @@ -54672,6 +56072,8 @@ object.analyzeQueryTextSentiment = false; object.channel = ""; object.sessionTtl = null; + object.endUserMetadata = null; + object.searchConfig = null; } if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; @@ -54707,6 +56109,10 @@ 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); return object; }; @@ -54739,6 +56145,1233 @@ return QueryParameters; })(); + v3.SearchConfig = (function() { + + /** + * Properties of a SearchConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ISearchConfig + * @property {Array.|null} [boostSpecs] SearchConfig boostSpecs + * @property {Array.|null} [filterSpecs] SearchConfig filterSpecs + */ + + /** + * Constructs a new SearchConfig. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a SearchConfig. + * @implements ISearchConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchConfig boostSpecs. + * @member {Array.} boostSpecs + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @instance + */ + SearchConfig.prototype.boostSpecs = $util.emptyArray; + + /** + * SearchConfig filterSpecs. + * @member {Array.} filterSpecs + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @instance + */ + SearchConfig.prototype.filterSpecs = $util.emptyArray; + + /** + * Creates a new SearchConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.ISearchConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig instance + */ + SearchConfig.create = function create(properties) { + return new SearchConfig(properties); + }; + + /** + * 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.SearchConfig + * @static + * @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 + */ + SearchConfig.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(); + return writer; + }; + + /** + * 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.SearchConfig + * @static + * @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 + */ + SearchConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchConfig message from the specified reader or buffer. + * @function decode + * @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.SearchConfig} SearchConfig + * @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) { + if (!(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(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SearchConfig} SearchConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchConfig message. + * @function verify + * @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 + */ + SearchConfig.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; + } + } + 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; + } + } + return null; + }; + + /** + * Creates a SearchConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.SearchConfig} SearchConfig + */ + 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.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]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3.SearchConfig} message SearchConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchConfig.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.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); + } + return object; + }; + + /** + * Converts this SearchConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @instance + * @returns {Object.} JSON object + */ + SearchConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.SearchConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SearchConfig"; + }; + + return SearchConfig; + })(); + + v3.BoostSpec = (function() { + + /** + * Properties of a BoostSpec. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IBoostSpec + * @property {Array.|null} [conditionBoostSpecs] BoostSpec conditionBoostSpecs + */ + + /** + * Constructs a new BoostSpec. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a BoostSpec. + * @implements IBoostSpec + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IBoostSpec=} [properties] Properties to set + */ + function BoostSpec(properties) { + this.conditionBoostSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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. + * @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 + */ + BoostSpec.create = function create(properties) { + return new BoostSpec(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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.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 + */ + BoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @function decode + * @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.BoostSpec} BoostSpec + * @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) { + if (!(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(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + } + return message; + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.BoostSpec} BoostSpec + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoostSpec message. + * @function verify + * @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 + */ + BoostSpec.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. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BoostSpec} BoostSpec + */ + 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.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; + }; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpec} message BoostSpec + * @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; + }; + + /** + * Converts this BoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @instance + * @returns {Object.} JSON object + */ + BoostSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoostSpec + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpec"; + }; + + BoostSpec.ConditionBoostSpec = (function() { + + /** + * 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 + */ + + /** + * 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]]; + } + + /** + * ConditionBoostSpec condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.condition = ""; + + /** + * ConditionBoostSpec boost. + * @member {number} boost + * @memberof google.cloud.dialogflow.cx.v3.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.boost = 0; + + /** + * 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 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); + return writer; + }; + + /** + * 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 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) { + if (!(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(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + message.boost = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 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"; + return null; + }; + + /** + * 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); + 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; + } + 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; + 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); + }; + + /** + * 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"; + }; + + 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) { + if (!(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(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataStores && message.dataStores.length)) + message.dataStores = []; + message.dataStores.push(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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.BoostSpecs} BoostSpecs + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoostSpecs message. + * @function verify + * @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 + */ + BoostSpecs.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.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 BoostSpecs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.BoostSpecs} BoostSpecs + */ + 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.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 BoostSpecs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3.BoostSpecs} message BoostSpecs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoostSpecs.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); + } + return object; + }; + + /** + * Converts this BoostSpecs to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @instance + * @returns {Object.} JSON object + */ + BoostSpecs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoostSpecs + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.BoostSpecs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.BoostSpecs"; + }; + + return BoostSpecs; + })(); + + v3.FilterSpecs = (function() { + + /** + * Properties of a FilterSpecs. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IFilterSpecs + * @property {Array.|null} [dataStores] FilterSpecs dataStores + * @property {string|null} [filter] FilterSpecs filter + */ + + /** + * 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 + */ + 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]]; + } + + /** + * FilterSpecs dataStores. + * @member {Array.} dataStores + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @instance + */ + FilterSpecs.prototype.dataStores = $util.emptyArray; + + /** + * FilterSpecs filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @instance + */ + FilterSpecs.prototype.filter = ""; + + /** + * 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); + }; + + /** + * 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; + }; + + /** + * 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 + */ + FilterSpecs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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) { + if (!(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(); + 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; + }; + + /** + * 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()); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * Converts this FilterSpecs to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.FilterSpecs + * @instance + * @returns {Object.} JSON object + */ + FilterSpecs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * 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() { /** @@ -55153,6 +57786,7 @@ * @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 */ /** @@ -55309,6 +57943,14 @@ */ QueryResult.prototype.advancedSettings = null; + /** + * QueryResult allowAnswerFeedback. + * @member {boolean} allowAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3.QueryResult + * @instance + */ + QueryResult.prototype.allowAnswerFeedback = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -55384,6 +58026,8 @@ $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.allowAnswerFeedback != null && Object.hasOwnProperty.call(message, "allowAnswerFeedback")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.allowAnswerFeedback); return writer; }; @@ -55492,6 +58136,10 @@ message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.decode(reader, reader.uint32()); break; } + case 32: { + message.allowAnswerFeedback = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -55632,6 +58280,9 @@ if (error) return "advancedSettings." + error; } + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + if (typeof message.allowAnswerFeedback !== "boolean") + return "allowAnswerFeedback: boolean expected"; return null; }; @@ -55729,6 +58380,8 @@ 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); return message; }; @@ -55760,6 +58413,7 @@ object.match = null; object.sentimentAnalysisResult = null; object.advancedSettings = null; + object.allowAnswerFeedback = false; } if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; @@ -55819,6 +58473,8 @@ if (options.oneofs) object.query = "dtmf"; } + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + object.allowAnswerFeedback = message.allowAnswerFeedback; return object; }; @@ -74416,224 +77072,228 @@ return StopExperimentRequest; })(); - v3.SecuritySettingsService = (function() { + v3.Generators = (function() { /** - * Constructs a new SecuritySettingsService service. + * Constructs a new Generators service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettingsService + * @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 SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { + function Generators(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; + (Generators.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Generators; /** - * Creates new SecuritySettingsService service using the specified rpc implementation. + * Creates new Generators service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * @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 {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. + * @returns {Generators} RPC service. Useful where requests and/or responses are streamed. */ - SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + Generators.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.SecuritySettingsService|createSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef CreateSecuritySettingsCallback + * 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.SecuritySettings} [response] SecuritySettings + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} [response] ListGeneratorsResponse */ /** - * Calls CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3.Generators * @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 + * @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(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" }); + 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 CreateSecuritySettings. - * @function createSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3.Generators * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise + * @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.SecuritySettingsService|getSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef GetSecuritySettingsCallback + * 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.SecuritySettings} [response] SecuritySettings + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator */ /** - * Calls GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @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 + * @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(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" }); + 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 GetSecuritySettings. - * @function getSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} request GetSecuritySettingsRequest message or plain object - * @returns {Promise} Promise + * @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.SecuritySettingsService|updateSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef UpdateSecuritySettingsCallback + * 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.SecuritySettings} [response] SecuritySettings + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator */ /** - * Calls UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @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 + * @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(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" }); + 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 UpdateSecuritySettings. - * @function updateSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} request UpdateSecuritySettingsRequest message or plain object - * @returns {Promise} Promise + * @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.SecuritySettingsService|listSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef ListSecuritySettingsCallback + * 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.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse + * @param {google.cloud.dialogflow.cx.v3.Generator} [response] Generator */ /** - * Calls ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @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 + * @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(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" }); + 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 ListSecuritySettings. - * @function listSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @instance - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} request ListSecuritySettingsRequest message or plain object - * @returns {Promise} Promise + * @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.SecuritySettingsService|deleteSecuritySettings}. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService - * @typedef DeleteSecuritySettingsCallback + * 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 DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls DeleteGenerator. + * @function deleteGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @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 + * @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(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" }); + 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 DeleteSecuritySettings. - * @function deleteSecuritySettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService + * Calls DeleteGenerator. + * @function deleteGenerator + * @memberof google.cloud.dialogflow.cx.v3.Generators * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - return SecuritySettingsService; + return Generators; })(); - v3.GetSecuritySettingsRequest = (function() { + v3.Generator = (function() { /** - * Properties of a GetSecuritySettingsRequest. + * Properties of a Generator. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetSecuritySettingsRequest - * @property {string|null} [name] GetSecuritySettingsRequest name + * @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 */ /** - * Constructs a new GetSecuritySettingsRequest. + * Constructs a new Generator. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetSecuritySettingsRequest. - * @implements IGetSecuritySettingsRequest + * @classdesc Represents a Generator. + * @implements IGenerator * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set */ - function GetSecuritySettingsRequest(properties) { + function Generator(properties) { + this.placeholders = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74641,70 +77301,101 @@ } /** - * GetSecuritySettingsRequest name. + * Generator name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @instance */ - GetSecuritySettingsRequest.prototype.name = ""; + Generator.prototype.name = ""; /** - * Creates a new GetSecuritySettingsRequest instance using the specified properties. + * 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; + + /** + * Creates a new Generator instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IGenerator=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator instance */ - GetSecuritySettingsRequest.create = function create(properties) { - return new GetSecuritySettingsRequest(properties); + Generator.create = function create(properties) { + return new Generator(properties); }; /** - * Encodes the specified GetSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * 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.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @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 */ - GetSecuritySettingsRequest.encode = function encode(message, 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(); return writer; }; /** - * Encodes the specified GetSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest.verify|verify} messages. + * 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.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static - * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest} message GetSecuritySettingsRequest message or plain object to encode + * @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 */ - GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Generator.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a Generator message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @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 */ - GetSecuritySettingsRequest.decode = function decode(reader, length) { + Generator.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest(); + 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(); switch (tag >>> 3) { @@ -74712,6 +77403,20 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -74721,123 +77426,397 @@ }; /** - * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a Generator message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @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.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @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 */ - GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + Generator.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSecuritySettingsRequest message. + * Verifies a Generator message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @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 */ - GetSecuritySettingsRequest.verify = function verify(message) { + 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; + } + } return null; }; /** - * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Generator message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.Generator} Generator */ - GetSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest) + 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.GetSecuritySettingsRequest(); + 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]); + } + } return message; }; /** - * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Generator message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static - * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.Generator} message Generator * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSecuritySettingsRequest.toObject = function toObject(message, options) { + Generator.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.placeholders = []; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.promptText = 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); + } return object; }; /** - * Converts this GetSecuritySettingsRequest to JSON. + * Converts this Generator to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @instance * @returns {Object.} JSON object */ - GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { + Generator.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSecuritySettingsRequest + * Gets the default type url for Generator * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Generator * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Generator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Generator"; }; - return GetSecuritySettingsRequest; + 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) { + if (!(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(); + 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; + })(); + + return Generator; })(); - v3.UpdateSecuritySettingsRequest = (function() { + v3.Phrase = (function() { /** - * Properties of an UpdateSecuritySettingsRequest. + * Properties of a Phrase. * @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 + * @interface IPhrase + * @property {string|null} [text] Phrase text */ /** - * Constructs a new UpdateSecuritySettingsRequest. + * Constructs a new Phrase. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateSecuritySettingsRequest. - * @implements IUpdateSecuritySettingsRequest + * @classdesc Represents a Phrase. + * @implements IPhrase * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set */ - function UpdateSecuritySettingsRequest(properties) { + function Phrase(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74845,89 +77824,75 @@ } /** - * UpdateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest - * @instance - */ - UpdateSecuritySettingsRequest.prototype.securitySettings = null; - - /** - * UpdateSecuritySettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * Phrase text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @instance */ - UpdateSecuritySettingsRequest.prototype.updateMask = null; + Phrase.prototype.text = ""; /** - * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. + * Creates a new Phrase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase instance */ - UpdateSecuritySettingsRequest.create = function create(properties) { - return new UpdateSecuritySettingsRequest(properties); + Phrase.create = function create(properties) { + return new Phrase(properties); }; /** - * Encodes the specified UpdateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * 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.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @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 */ - UpdateSecuritySettingsRequest.encode = function encode(message, writer) { + Phrase.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(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified UpdateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest.verify|verify} messages. + * 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.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest message or plain object to encode + * @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 */ - UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Phrase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecuritySettingsRequest 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.UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @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 */ - UpdateSecuritySettingsRequest.decode = function decode(reader, length) { + Phrase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest(); + 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(); 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()); + message.text = reader.string(); break; } default: @@ -74939,143 +77904,125 @@ }; /** - * Decodes an UpdateSecuritySettingsRequest 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.UpdateSecuritySettingsRequest + * @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.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @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 */ - UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + Phrase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecuritySettingsRequest message. + * Verifies a Phrase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @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 */ - UpdateSecuritySettingsRequest.verify = function verify(message) { + Phrase.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; - } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates an UpdateSecuritySettingsRequest 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.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.Phrase} Phrase */ - UpdateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest) + 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.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); - } + 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 an UpdateSecuritySettingsRequest 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.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.Phrase} message Phrase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { + Phrase.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); + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this UpdateSecuritySettingsRequest to JSON. + * Converts this Phrase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @instance * @returns {Object.} JSON object */ - UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + Phrase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSecuritySettingsRequest + * Gets the default type url for Phrase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.Phrase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Phrase"; }; - return UpdateSecuritySettingsRequest; + return Phrase; })(); - v3.ListSecuritySettingsRequest = (function() { + v3.ListGeneratorsRequest = (function() { /** - * Properties of a ListSecuritySettingsRequest. + * Properties of a ListGeneratorsRequest. * @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 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 ListSecuritySettingsRequest. + * Constructs a new ListGeneratorsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsRequest. - * @implements IListSecuritySettingsRequest + * @classdesc Represents a ListGeneratorsRequest. + * @implements IListGeneratorsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsRequest=} [properties] Properties to set */ - function ListSecuritySettingsRequest(properties) { + function ListGeneratorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75083,90 +78030,100 @@ } /** - * ListSecuritySettingsRequest parent. + * ListGeneratorsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @instance */ - ListSecuritySettingsRequest.prototype.parent = ""; + ListGeneratorsRequest.prototype.parent = ""; /** - * ListSecuritySettingsRequest pageSize. + * 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.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @instance */ - ListSecuritySettingsRequest.prototype.pageSize = 0; + ListGeneratorsRequest.prototype.pageSize = 0; /** - * ListSecuritySettingsRequest pageToken. + * ListGeneratorsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @instance */ - ListSecuritySettingsRequest.prototype.pageToken = ""; + ListGeneratorsRequest.prototype.pageToken = ""; /** - * Creates a new ListSecuritySettingsRequest instance using the specified properties. + * Creates a new ListGeneratorsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @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.IListGeneratorsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest instance */ - ListSecuritySettingsRequest.create = function create(properties) { - return new ListSecuritySettingsRequest(properties); + ListGeneratorsRequest.create = function create(properties) { + return new ListGeneratorsRequest(properties); }; /** - * Encodes the specified ListSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * 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.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @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 */ - ListSecuritySettingsRequest.encode = function encode(message, 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 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 ListSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest.verify|verify} messages. + * 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.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest} message ListSecuritySettingsRequest message or plain object to encode + * @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 */ - ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGeneratorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @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 */ - ListSecuritySettingsRequest.decode = function decode(reader, length) { + ListGeneratorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); + 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(); switch (tag >>> 3) { @@ -75175,10 +78132,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; } @@ -75191,35 +78152,38 @@ }; /** - * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @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.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @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 */ - ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListGeneratorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsRequest message. + * Verifies a ListGeneratorsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @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 */ - ListSecuritySettingsRequest.verify = function verify(message) { + 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"; @@ -75230,19 +78194,21 @@ }; /** - * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsRequest 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.ListGeneratorsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} ListGeneratorsRequest */ - ListSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest) + 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.ListSecuritySettingsRequest(); + 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) @@ -75251,25 +78217,28 @@ }; /** - * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsRequest} message ListGeneratorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsRequest.toObject = function toObject(message, options) { + 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")) @@ -75278,54 +78247,54 @@ }; /** - * Converts this ListSecuritySettingsRequest to JSON. + * Converts this ListGeneratorsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { + ListGeneratorsRequest.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 ListGeneratorsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGeneratorsRequest.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.ListGeneratorsRequest"; }; - return ListSecuritySettingsRequest; + return ListGeneratorsRequest; })(); - v3.ListSecuritySettingsResponse = (function() { + v3.ListGeneratorsResponse = (function() { /** - * Properties of a ListSecuritySettingsResponse. + * Properties of a ListGeneratorsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListSecuritySettingsResponse - * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings - * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken + * @interface IListGeneratorsResponse + * @property {Array.|null} [generators] ListGeneratorsResponse generators + * @property {string|null} [nextPageToken] ListGeneratorsResponse nextPageToken */ /** - * Constructs a new ListSecuritySettingsResponse. + * Constructs a new ListGeneratorsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListSecuritySettingsResponse. - * @implements IListSecuritySettingsResponse + * @classdesc Represents a ListGeneratorsResponse. + * @implements IListGeneratorsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListGeneratorsResponse=} [properties] Properties to set */ - function ListSecuritySettingsResponse(properties) { - this.securitySettings = []; + function ListGeneratorsResponse(properties) { + this.generators = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75333,88 +78302,88 @@ } /** - * ListSecuritySettingsResponse securitySettings. - * @member {Array.} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * ListGeneratorsResponse generators. + * @member {Array.} generators + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @instance */ - ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; + ListGeneratorsResponse.prototype.generators = $util.emptyArray; /** - * ListSecuritySettingsResponse nextPageToken. + * ListGeneratorsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @instance */ - ListSecuritySettingsResponse.prototype.nextPageToken = ""; + ListGeneratorsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListSecuritySettingsResponse instance using the specified properties. + * Creates a new ListGeneratorsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @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.IListGeneratorsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse instance */ - ListSecuritySettingsResponse.create = function create(properties) { - return new ListSecuritySettingsResponse(properties); + ListGeneratorsResponse.create = function create(properties) { + return new ListGeneratorsResponse(properties); }; /** - * Encodes the specified ListSecuritySettingsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * 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.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @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 */ - ListSecuritySettingsResponse.encode = function encode(message, writer) { + ListGeneratorsResponse.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.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 ListSecuritySettingsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse.verify|verify} messages. + * 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.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse} message ListSecuritySettingsResponse message or plain object to encode + * @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 */ - ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListGeneratorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @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 */ - ListSecuritySettingsResponse.decode = function decode(reader, length) { + ListGeneratorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse(); + 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(); 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.generators && message.generators.length)) + message.generators = []; + message.generators.push($root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32())); break; } case 2: { @@ -75430,39 +78399,39 @@ }; /** - * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @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.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @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 */ - ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { + ListGeneratorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecuritySettingsResponse message. + * Verifies a ListGeneratorsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @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 */ - ListSecuritySettingsResponse.verify = function verify(message) { + ListGeneratorsResponse.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.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 "securitySettings." + error; + return "generators." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -75472,25 +78441,25 @@ }; /** - * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsResponse 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.ListGeneratorsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} ListGeneratorsResponse */ - ListSecuritySettingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse) + 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.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.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) @@ -75499,26 +78468,26 @@ }; /** - * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse + * @param {google.cloud.dialogflow.cx.v3.ListGeneratorsResponse} message ListGeneratorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecuritySettingsResponse.toObject = function toObject(message, options) { + ListGeneratorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.securitySettings = []; + object.generators = []; 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.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; @@ -75526,53 +78495,53 @@ }; /** - * Converts this ListSecuritySettingsResponse to JSON. + * Converts this ListGeneratorsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @instance * @returns {Object.} JSON object */ - ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { + ListGeneratorsResponse.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 ListGeneratorsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListGeneratorsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecuritySettingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGeneratorsResponse.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.ListGeneratorsResponse"; }; - return ListSecuritySettingsResponse; + return ListGeneratorsResponse; })(); - v3.CreateSecuritySettingsRequest = (function() { + v3.GetGeneratorRequest = (function() { /** - * Properties of a CreateSecuritySettingsRequest. + * Properties of a GetGeneratorRequest. * @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 IGetGeneratorRequest + * @property {string|null} [name] GetGeneratorRequest name + * @property {string|null} [languageCode] GetGeneratorRequest languageCode */ /** - * Constructs a new CreateSecuritySettingsRequest. + * Constructs a new GetGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateSecuritySettingsRequest. - * @implements ICreateSecuritySettingsRequest + * @classdesc Represents a GetGeneratorRequest. + * @implements IGetGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetGeneratorRequest=} [properties] Properties to set */ - function CreateSecuritySettingsRequest(properties) { + function GetGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75580,89 +78549,89 @@ } /** - * CreateSecuritySettingsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * GetGeneratorRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @instance */ - CreateSecuritySettingsRequest.prototype.parent = ""; + GetGeneratorRequest.prototype.name = ""; /** - * CreateSecuritySettingsRequest securitySettings. - * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * GetGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @instance */ - CreateSecuritySettingsRequest.prototype.securitySettings = null; + GetGeneratorRequest.prototype.languageCode = ""; /** - * Creates a new CreateSecuritySettingsRequest instance using the specified properties. + * Creates a new GetGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @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.IGetGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest instance */ - CreateSecuritySettingsRequest.create = function create(properties) { - return new CreateSecuritySettingsRequest(properties); + GetGeneratorRequest.create = function create(properties) { + return new GetGeneratorRequest(properties); }; /** - * Encodes the specified CreateSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * 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.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @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 */ - CreateSecuritySettingsRequest.encode = function encode(message, writer) { + GetGeneratorRequest.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.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 CreateSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest.verify|verify} messages. + * 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.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} message CreateSecuritySettingsRequest message or plain object to encode + * @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 */ - CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a GetGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @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 */ - CreateSecuritySettingsRequest.decode = function decode(reader, length) { + GetGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest(); + 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(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; } default: @@ -75674,136 +78643,133 @@ }; /** - * Decodes a CreateSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @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.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @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 */ - CreateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + GetGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSecuritySettingsRequest message. + * Verifies a GetGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @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 */ - CreateSecuritySettingsRequest.verify = function verify(message) { + GetGeneratorRequest.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 (error) - return "securitySettings." + 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 CreateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGeneratorRequest 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.GetGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} GetGeneratorRequest */ - CreateSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest) + 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.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); - } + 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 CreateSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.GetGeneratorRequest} message GetGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSecuritySettingsRequest.toObject = function toObject(message, options) { + GetGeneratorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.securitySettings = null; + object.name = ""; + object.languageCode = ""; } - 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateSecuritySettingsRequest to JSON. + * Converts this GetGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @instance * @returns {Object.} JSON object */ - CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { + GetGeneratorRequest.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 GetGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.GetGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetGeneratorRequest.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.GetGeneratorRequest"; }; - return CreateSecuritySettingsRequest; + return GetGeneratorRequest; })(); - v3.DeleteSecuritySettingsRequest = (function() { + v3.CreateGeneratorRequest = (function() { /** - * Properties of a DeleteSecuritySettingsRequest. + * Properties of a CreateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteSecuritySettingsRequest - * @property {string|null} [name] DeleteSecuritySettingsRequest name + * @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 DeleteSecuritySettingsRequest. + * Constructs a new CreateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteSecuritySettingsRequest. - * @implements IDeleteSecuritySettingsRequest + * @classdesc Represents a CreateGeneratorRequest. + * @implements ICreateGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest=} [properties] Properties to set */ - function DeleteSecuritySettingsRequest(properties) { + function CreateGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75811,75 +78777,103 @@ } /** - * DeleteSecuritySettingsRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * CreateGeneratorRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @instance */ - DeleteSecuritySettingsRequest.prototype.name = ""; + CreateGeneratorRequest.prototype.parent = ""; /** - * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. + * 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.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @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.ICreateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest instance */ - DeleteSecuritySettingsRequest.create = function create(properties) { - return new DeleteSecuritySettingsRequest(properties); + CreateGeneratorRequest.create = function create(properties) { + return new CreateGeneratorRequest(properties); }; /** - * Encodes the specified DeleteSecuritySettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * 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.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @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 */ - DeleteSecuritySettingsRequest.encode = function encode(message, writer) { + CreateGeneratorRequest.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.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 DeleteSecuritySettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest.verify|verify} messages. + * 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.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest message or plain object to encode + * @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 */ - DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @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 */ - DeleteSecuritySettingsRequest.decode = function decode(reader, length) { + CreateGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest(); + 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(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + 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: @@ -75891,133 +78885,146 @@ }; /** - * Decodes a DeleteSecuritySettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @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.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @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 */ - DeleteSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSecuritySettingsRequest message. + * Verifies a CreateGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @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 */ - DeleteSecuritySettingsRequest.verify = function verify(message) { + CreateGeneratorRequest.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.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 DeleteSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGeneratorRequest 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.CreateGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} CreateGeneratorRequest */ - DeleteSecuritySettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest) + 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.DeleteSecuritySettingsRequest(); - if (object.name != null) - message.name = String(object.name); + 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 DeleteSecuritySettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest + * @param {google.cloud.dialogflow.cx.v3.CreateGeneratorRequest} message CreateGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { + CreateGeneratorRequest.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.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 DeleteSecuritySettingsRequest to JSON. + * Converts this CreateGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @instance * @returns {Object.} JSON object */ - DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { + CreateGeneratorRequest.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 CreateGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateGeneratorRequest.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.CreateGeneratorRequest"; }; - return DeleteSecuritySettingsRequest; + return CreateGeneratorRequest; })(); - v3.SecuritySettings = (function() { + v3.UpdateGeneratorRequest = (function() { /** - * Properties of a SecuritySettings. + * Properties of an UpdateGeneratorRequest. * @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 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 SecuritySettings. + * Constructs a new UpdateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a SecuritySettings. - * @implements ISecuritySettings + * @classdesc Represents an UpdateGeneratorRequest. + * @implements IUpdateGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest=} [properties] Properties to set */ - function SecuritySettings(properties) { - this.purgeDataTypes = []; + function UpdateGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76025,240 +79032,103 @@ } /** - * SecuritySettings 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 + * UpdateGeneratorRequest generator. + * @member {google.cloud.dialogflow.cx.v3.IGenerator|null|undefined} generator + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @instance */ - SecuritySettings.prototype.audioExportSettings = null; + UpdateGeneratorRequest.prototype.generator = null; /** - * SecuritySettings insightsExportSettings. - * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IInsightsExportSettings|null|undefined} insightsExportSettings - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * UpdateGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @instance */ - SecuritySettings.prototype.insightsExportSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateGeneratorRequest.prototype.languageCode = ""; /** - * SecuritySettings dataRetention. - * @member {"retentionWindowDays"|"retentionStrategy"|undefined} dataRetention - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * UpdateGeneratorRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @instance */ - Object.defineProperty(SecuritySettings.prototype, "dataRetention", { - get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays", "retentionStrategy"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateGeneratorRequest.prototype.updateMask = null; /** - * Creates a new SecuritySettings instance using the specified properties. + * Creates a new UpdateGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @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.IUpdateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest instance */ - SecuritySettings.create = function create(properties) { - return new SecuritySettings(properties); + UpdateGeneratorRequest.create = function create(properties) { + return new UpdateGeneratorRequest(properties); }; /** - * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * 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.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode + * @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 */ - SecuritySettings.encode = function encode(message, writer) { + UpdateGeneratorRequest.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); + 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 SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.SecuritySettings.verify|verify} messages. + * 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.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings} message SecuritySettings message or plain object to encode + * @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 */ - SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + UpdateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecuritySettings message from the specified reader or buffer. + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @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.SecuritySettings} SecuritySettings + * @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 */ - SecuritySettings.decode = function decode(reader, length) { + UpdateGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.SecuritySettings(); + 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(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.generator = $root.google.cloud.dialogflow.cx.v3.Generator.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); + message.languageCode = 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()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -76270,1158 +79140,576 @@ }; /** - * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @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.SecuritySettings} SecuritySettings + * @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 */ - SecuritySettings.decodeDelimited = function decodeDelimited(reader) { + UpdateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecuritySettings message. + * Verifies an UpdateGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @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 */ - SecuritySettings.verify = function verify(message) { + UpdateGeneratorRequest.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 (message.generator != null && message.hasOwnProperty("generator")) { + var error = $root.google.cloud.dialogflow.cx.v3.Generator.verify(message.generator); if (error) - return "audioExportSettings." + error; + return "generator." + error; } - if (message.insightsExportSettings != null && message.hasOwnProperty("insightsExportSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings.verify(message.insightsExportSettings); + 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 "insightsExportSettings." + error; + return "updateMask." + error; } return null; }; /** - * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGeneratorRequest 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.UpdateGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings + * @returns {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} UpdateGeneratorRequest */ - SecuritySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.SecuritySettings) + 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.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); + 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.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.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 a SecuritySettings message. Also converts values to other types if specified. + * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings + * @param {google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest} message UpdateGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecuritySettings.toObject = function toObject(message, options) { + UpdateGeneratorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.purgeDataTypes = []; 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]; + object.generator = null; + object.languageCode = ""; + object.updateMask = null; } - 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; + 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 SecuritySettings to JSON. + * Converts this UpdateGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @instance * @returns {Object.} JSON object */ - SecuritySettings.prototype.toJSON = function toJSON() { + UpdateGeneratorRequest.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 UpdateGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateGeneratorRequest.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.UpdateGeneratorRequest"; }; + return UpdateGeneratorRequest; + })(); + + v3.DeleteGeneratorRequest = (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 DeleteGeneratorRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteGeneratorRequest + * @property {string|null} [name] DeleteGeneratorRequest name + * @property {boolean|null} [force] DeleteGeneratorRequest force */ - 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 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 */ - 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 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]]; + } /** - * 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 + * DeleteGeneratorRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @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; - })(); + DeleteGeneratorRequest.prototype.name = ""; /** - * 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 + * DeleteGeneratorRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest + * @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; - })(); - - 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 - */ - - /** - * 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; + DeleteGeneratorRequest.prototype.force = 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); - }; + /** + * 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 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); - return writer; - }; + /** + * 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 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(); - }; + /** + * 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 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) { - if (!(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(); - 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; - } - default: - reader.skipType(tag & 7); + /** + * 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) { + if (!(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(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); 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: + case 2: { + message.force = reader.bool(); break; } - 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; + reader.skipType(tag & 7); break; } - 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; - } - 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; - 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; - })(); - - SecuritySettings.InsightsExportSettings = (function() { - - /** - * Properties of an InsightsExportSettings. - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings - * @interface IInsightsExportSettings - * @property {boolean|null} [enableInsightsExport] InsightsExportSettings enableInsightsExport - */ - - /** - * 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]]; } + return message; + }; - /** - * InsightsExportSettings enableInsightsExport. - * @member {boolean} enableInsightsExport - * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings - * @instance - */ - InsightsExportSettings.prototype.enableInsightsExport = false; - - /** - * 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); - }; - - /** - * 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 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(); - }; - - /** - * 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) { - if (!(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(); - switch (tag >>> 3) { - case 1: { - message.enableInsightsExport = reader.bool(); - 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()); - }; - - /** - * 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 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()); + }; - /** - * 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 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 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 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; + }; - /** - * 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 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; + }; - /** - * 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 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); + }; - return InsightsExportSettings; - })(); + /** + * 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 SecuritySettings; + return DeleteGeneratorRequest; })(); - v3.Versions = (function() { + v3.SecuritySettingsService = (function() { /** - * Constructs a new Versions service. + * Constructs a new SecuritySettingsService service. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Versions + * @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 Versions(rpcImpl, requestDelimited, responseDelimited) { + function SecuritySettingsService(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (Versions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Versions; + (SecuritySettingsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecuritySettingsService; /** - * Creates new Versions service using the specified rpc implementation. + * Creates new SecuritySettingsService service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Versions + * @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 {Versions} RPC service. Useful where requests and/or responses are streamed. + * @returns {SecuritySettingsService} RPC service. Useful where requests and/or responses are streamed. */ - Versions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + SecuritySettingsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|listVersions}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef ListVersionsCallback + * 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.ListVersionsResponse} [response] ListVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings */ /** - * Calls ListVersions. - * @function listVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @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(Versions.prototype.listVersions = function listVersions(request, callback) { - return this.rpcCall(listVersions, $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse, request, callback); - }, "name", { value: "ListVersions" }); + 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" }); /** - * Calls ListVersions. - * @function listVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls CreateSecuritySettings. + * @function createSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest} request CreateSecuritySettingsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|getVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef GetVersionCallback + * 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.Version} [response] Version + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings */ /** - * Calls GetVersion. - * @function getVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @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(Versions.prototype.getVersion = function getVersion(request, callback) { - return this.rpcCall(getVersion, $root.google.cloud.dialogflow.cx.v3.GetVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); - }, "name", { value: "GetVersion" }); + 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 GetVersion. - * @function getVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls GetSecuritySettings. + * @function getSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object - * @returns {Promise} Promise + * @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.Versions|createVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef CreateVersionCallback + * 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.longrunning.Operation} [response] Operation + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} [response] SecuritySettings */ /** - * Calls CreateVersion. - * @function createVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @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(Versions.prototype.createVersion = function createVersion(request, callback) { - return this.rpcCall(createVersion, $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateVersion" }); + 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 CreateVersion. - * @function createVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls UpdateSecuritySettings. + * @function updateSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object - * @returns {Promise} Promise + * @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.Versions|updateVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef UpdateVersionCallback + * 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.Version} [response] Version + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} [response] ListSecuritySettingsResponse */ /** - * Calls UpdateVersion. - * @function updateVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version + * @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(Versions.prototype.updateVersion = function updateVersion(request, callback) { - return this.rpcCall(updateVersion, $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); - }, "name", { value: "UpdateVersion" }); + 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 UpdateVersion. - * @function updateVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls ListSecuritySettings. + * @function listSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object - * @returns {Promise} Promise + * @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.Versions|deleteVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef DeleteVersionCallback + * 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 DeleteVersion. - * @function deleteVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @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(Versions.prototype.deleteVersion = function deleteVersion(request, callback) { - return this.rpcCall(deleteVersion, $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteVersion" }); + 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 DeleteVersion. - * @function deleteVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions + * Calls DeleteSecuritySettings. + * @function deleteSecuritySettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettingsService * @instance - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest} request DeleteSecuritySettingsRequest message or plain object * @returns {Promise} Promise * @variation 2 */ - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|loadVersion}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef LoadVersionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls LoadVersion. - * @function loadVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Versions.prototype.loadVersion = function loadVersion(request, callback) { - return this.rpcCall(loadVersion, $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "LoadVersion" }); - - /** - * Calls LoadVersion. - * @function loadVersion - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|compareVersions}. - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @typedef CompareVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} [response] CompareVersionsResponse - */ - - /** - * Calls CompareVersions. - * @function compareVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} request CompareVersionsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3.Versions.CompareVersionsCallback} callback Node-style callback called with the error, if any, and CompareVersionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Versions.prototype.compareVersions = function compareVersions(request, callback) { - return this.rpcCall(compareVersions, $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest, $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse, request, callback); - }, "name", { value: "CompareVersions" }); - - /** - * Calls CompareVersions. - * @function compareVersions - * @memberof google.cloud.dialogflow.cx.v3.Versions - * @instance - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} request CompareVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Versions; + return SecuritySettingsService; })(); - v3.CreateVersionOperationMetadata = (function() { + v3.GetSecuritySettingsRequest = (function() { /** - * Properties of a CreateVersionOperationMetadata. + * Properties of a GetSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateVersionOperationMetadata - * @property {string|null} [version] CreateVersionOperationMetadata version + * @interface IGetSecuritySettingsRequest + * @property {string|null} [name] GetSecuritySettingsRequest name */ /** - * Constructs a new CreateVersionOperationMetadata. + * Constructs a new GetSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateVersionOperationMetadata. - * @implements ICreateVersionOperationMetadata + * @classdesc Represents a GetSecuritySettingsRequest. + * @implements IGetSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set */ - function CreateVersionOperationMetadata(properties) { + function GetSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77429,75 +79717,75 @@ } /** - * CreateVersionOperationMetadata version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * GetSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @instance */ - CreateVersionOperationMetadata.prototype.version = ""; + GetSecuritySettingsRequest.prototype.name = ""; /** - * Creates a new CreateVersionOperationMetadata instance using the specified properties. + * Creates a new GetSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata instance + * @param {google.cloud.dialogflow.cx.v3.IGetSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest instance */ - CreateVersionOperationMetadata.create = function create(properties) { - return new CreateVersionOperationMetadata(properties); + GetSecuritySettingsRequest.create = function create(properties) { + return new GetSecuritySettingsRequest(properties); }; /** - * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * 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.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @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 */ - CreateVersionOperationMetadata.encode = function encode(message, writer) { + GetSecuritySettingsRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. + * 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.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode + * @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 */ - CreateVersionOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @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.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @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 */ - CreateVersionOperationMetadata.decode = function decode(reader, length) { + GetSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); + 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(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.name = reader.string(); break; } default: @@ -77509,127 +79797,123 @@ }; /** - * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @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.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @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 */ - CreateVersionOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + GetSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateVersionOperationMetadata message. + * Verifies a GetSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @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 */ - CreateVersionOperationMetadata.verify = function verify(message) { + GetSecuritySettingsRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata + * @returns {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} GetSecuritySettingsRequest */ - CreateVersionOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata) + 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.CreateVersionOperationMetadata(); - if (object.version != null) - message.version = String(object.version); + 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 CreateVersionOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} message CreateVersionOperationMetadata + * @param {google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest} message GetSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateVersionOperationMetadata.toObject = function toObject(message, options) { + GetSecuritySettingsRequest.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; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateVersionOperationMetadata to JSON. + * Converts this GetSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - CreateVersionOperationMetadata.prototype.toJSON = function toJSON() { + GetSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateVersionOperationMetadata + * Gets the default type url for GetSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata + * @memberof google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateVersionOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetSecuritySettingsRequest"; }; - return CreateVersionOperationMetadata; + return GetSecuritySettingsRequest; })(); - v3.Version = (function() { + v3.UpdateSecuritySettingsRequest = (function() { /** - * Properties of a Version. + * Properties of an UpdateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IVersion - * @property {string|null} [name] Version name - * @property {string|null} [displayName] Version displayName - * @property {string|null} [description] Version description - * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Version nluSettings - * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime - * @property {google.cloud.dialogflow.cx.v3.Version.State|null} [state] Version state + * @interface IUpdateSecuritySettingsRequest + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] UpdateSecuritySettingsRequest securitySettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecuritySettingsRequest updateMask */ /** - * Constructs a new Version. + * Constructs a new UpdateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a Version. - * @implements IVersion + * @classdesc Represents an UpdateSecuritySettingsRequest. + * @implements IUpdateSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set */ - function Version(properties) { + function UpdateSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77637,145 +79921,89 @@ } /** - * Version name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.name = ""; - - /** - * Version displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.displayName = ""; - - /** - * Version description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.description = ""; - - /** - * Version nluSettings. - * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3.Version - * @instance - */ - Version.prototype.nluSettings = null; - - /** - * Version createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3.Version + * UpdateSecuritySettingsRequest securitySettings. + * @member {google.cloud.dialogflow.cx.v3.ISecuritySettings|null|undefined} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance */ - Version.prototype.createTime = null; + UpdateSecuritySettingsRequest.prototype.securitySettings = null; /** - * Version state. - * @member {google.cloud.dialogflow.cx.v3.Version.State} state - * @memberof google.cloud.dialogflow.cx.v3.Version + * UpdateSecuritySettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance */ - Version.prototype.state = 0; + UpdateSecuritySettingsRequest.prototype.updateMask = null; /** - * Creates a new Version instance using the specified properties. + * Creates a new UpdateSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.Version} Version instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest instance */ - Version.create = function create(properties) { - return new Version(properties); + UpdateSecuritySettingsRequest.create = function create(properties) { + return new UpdateSecuritySettingsRequest(properties); }; /** - * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * 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.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @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 */ - Version.encode = function encode(message, writer) { + UpdateSecuritySettingsRequest.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.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + 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; }; /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. + * 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.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode + * @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 */ - Version.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Version message from the specified reader or buffer. + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.Version + * @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.Version} Version + * @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 */ - Version.decode = function decode(reader, length) { + UpdateSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Version(); + 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(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.state = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -77787,222 +80015,143 @@ }; /** - * Decodes a Version message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.Version + * @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.Version} Version + * @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 */ - Version.decodeDelimited = function decodeDelimited(reader) { + UpdateSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Version message. + * Verifies an UpdateSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.Version + * @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 */ - Version.verify = function verify(message) { + UpdateSecuritySettingsRequest.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.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.verify(message.securitySettings); if (error) - return "nluSettings." + error; + return "securitySettings." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "createTime." + error; + return "updateMask." + error; } - 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; - } return null; }; /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.Version} Version + * @returns {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} UpdateSecuritySettingsRequest */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.Version) + 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.Version(); - 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.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Version.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.Version.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + 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); } - 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 "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; + 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 a Version message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.Version} message Version + * @param {google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest} message UpdateSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Version.toObject = function toObject(message, options) { + UpdateSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.securitySettings = null; + object.updateMask = 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.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; + 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 Version to JSON. + * Converts this UpdateSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - Version.prototype.toJSON = function toJSON() { + UpdateSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Version + * Gets the default type url for UpdateSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.Version + * @memberof google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Version"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateSecuritySettingsRequest"; }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3.Version.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 - */ - Version.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; - })(); - - return Version; + return UpdateSecuritySettingsRequest; })(); - v3.ListVersionsRequest = (function() { + v3.ListSecuritySettingsRequest = (function() { /** - * Properties of a ListVersionsRequest. + * Properties of a ListSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListVersionsRequest - * @property {string|null} [parent] ListVersionsRequest parent - * @property {number|null} [pageSize] ListVersionsRequest pageSize - * @property {string|null} [pageToken] ListVersionsRequest pageToken + * @interface IListSecuritySettingsRequest + * @property {string|null} [parent] ListSecuritySettingsRequest parent + * @property {number|null} [pageSize] ListSecuritySettingsRequest pageSize + * @property {string|null} [pageToken] ListSecuritySettingsRequest pageToken */ /** - * Constructs a new ListVersionsRequest. + * Constructs a new ListSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListVersionsRequest. - * @implements IListVersionsRequest + * @classdesc Represents a ListSecuritySettingsRequest. + * @implements IListSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set */ - function ListVersionsRequest(properties) { + function ListSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78010,51 +80159,51 @@ } /** - * ListVersionsRequest parent. + * ListSecuritySettingsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - ListVersionsRequest.prototype.parent = ""; + ListSecuritySettingsRequest.prototype.parent = ""; /** - * ListVersionsRequest pageSize. + * ListSecuritySettingsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - ListVersionsRequest.prototype.pageSize = 0; + ListSecuritySettingsRequest.prototype.pageSize = 0; /** - * ListVersionsRequest pageToken. + * ListSecuritySettingsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance */ - ListVersionsRequest.prototype.pageToken = ""; + ListSecuritySettingsRequest.prototype.pageToken = ""; /** - * Creates a new ListVersionsRequest instance using the specified properties. + * Creates a new ListSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest instance */ - ListVersionsRequest.create = function create(properties) { - return new ListVersionsRequest(properties); + ListSecuritySettingsRequest.create = function create(properties) { + return new ListSecuritySettingsRequest(properties); }; /** - * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * 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.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @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 */ - ListVersionsRequest.encode = function encode(message, writer) { + ListSecuritySettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -78067,33 +80216,33 @@ }; /** - * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. + * 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.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @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 */ - ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @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.ListVersionsRequest} ListVersionsRequest + * @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 */ - ListVersionsRequest.decode = function decode(reader, length) { + ListSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); + 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(); switch (tag >>> 3) { @@ -78118,30 +80267,30 @@ }; /** - * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @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.ListVersionsRequest} ListVersionsRequest + * @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 */ - ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListSecuritySettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsRequest message. + * Verifies a ListSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @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 */ - ListVersionsRequest.verify = function verify(message) { + ListSecuritySettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -78157,17 +80306,17 @@ }; /** - * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} ListSecuritySettingsRequest */ - ListVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest) + 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.ListVersionsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -78178,15 +80327,15 @@ }; /** - * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSecuritySettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ListVersionsRequest} message ListVersionsRequest + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest} message ListSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsRequest.toObject = function toObject(message, options) { + ListSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -78205,54 +80354,54 @@ }; /** - * Converts this ListVersionsRequest to JSON. + * Converts this ListSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - ListVersionsRequest.prototype.toJSON = function toJSON() { + ListSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVersionsRequest + * Gets the default type url for ListSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListVersionsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsRequest"; }; - return ListVersionsRequest; + return ListSecuritySettingsRequest; })(); - v3.ListVersionsResponse = (function() { + v3.ListSecuritySettingsResponse = (function() { /** - * Properties of a ListVersionsResponse. + * Properties of a ListSecuritySettingsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IListVersionsResponse - * @property {Array.|null} [versions] ListVersionsResponse versions - * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + * @interface IListSecuritySettingsResponse + * @property {Array.|null} [securitySettings] ListSecuritySettingsResponse securitySettings + * @property {string|null} [nextPageToken] ListSecuritySettingsResponse nextPageToken */ /** - * Constructs a new ListVersionsResponse. + * Constructs a new ListSecuritySettingsResponse. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a ListVersionsResponse. - * @implements IListVersionsResponse + * @classdesc Represents a ListSecuritySettingsResponse. + * @implements IListSecuritySettingsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set */ - function ListVersionsResponse(properties) { - this.versions = []; + function ListSecuritySettingsResponse(properties) { + this.securitySettings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78260,88 +80409,88 @@ } /** - * ListVersionsResponse versions. - * @member {Array.} versions - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * ListSecuritySettingsResponse securitySettings. + * @member {Array.} securitySettings + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @instance */ - ListVersionsResponse.prototype.versions = $util.emptyArray; + ListSecuritySettingsResponse.prototype.securitySettings = $util.emptyArray; /** - * ListVersionsResponse nextPageToken. + * ListSecuritySettingsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @instance */ - ListVersionsResponse.prototype.nextPageToken = ""; + ListSecuritySettingsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListVersionsResponse instance using the specified properties. + * Creates a new ListSecuritySettingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IListSecuritySettingsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse instance */ - ListVersionsResponse.create = function create(properties) { - return new ListVersionsResponse(properties); + ListSecuritySettingsResponse.create = function create(properties) { + return new ListSecuritySettingsResponse(properties); }; /** - * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * 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.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @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 */ - ListVersionsResponse.encode = function encode(message, writer) { + ListSecuritySettingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.versions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * 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.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @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 */ - ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListSecuritySettingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @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.ListVersionsResponse} ListVersionsResponse + * @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 */ - ListVersionsResponse.decode = function decode(reader, length) { + ListSecuritySettingsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); + 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(); switch (tag >>> 3) { case 1: { - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32())); + if (!(message.securitySettings && message.securitySettings.length)) + message.securitySettings = []; + message.securitySettings.push($root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32())); break; } case 2: { @@ -78357,39 +80506,39 @@ }; /** - * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSecuritySettingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @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.ListVersionsResponse} ListVersionsResponse + * @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 */ - ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + ListSecuritySettingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVersionsResponse message. + * Verifies a ListSecuritySettingsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @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 */ - ListVersionsResponse.verify = function verify(message) { + ListSecuritySettingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (var i = 0; i < message.versions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.versions[i]); + 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 "versions." + error; + return "securitySettings." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -78399,25 +80548,25 @@ }; /** - * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecuritySettingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} ListSecuritySettingsResponse */ - ListVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse) + 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.ListVersionsResponse(); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: object expected"); - message.versions[i] = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.versions[i]); + 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) @@ -78426,26 +80575,26 @@ }; /** - * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListSecuritySettingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static - * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} message ListVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse} message ListSecuritySettingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVersionsResponse.toObject = function toObject(message, options) { + ListSecuritySettingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.versions = []; + object.securitySettings = []; if (options.defaults) object.nextPageToken = ""; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.versions[j], options); + 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; @@ -78453,52 +80602,53 @@ }; /** - * Converts this ListVersionsResponse to JSON. + * Converts this ListSecuritySettingsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @instance * @returns {Object.} JSON object */ - ListVersionsResponse.prototype.toJSON = function toJSON() { + ListSecuritySettingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVersionsResponse + * Gets the default type url for ListSecuritySettingsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSecuritySettingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListVersionsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListSecuritySettingsResponse"; }; - return ListVersionsResponse; + return ListSecuritySettingsResponse; })(); - v3.GetVersionRequest = (function() { + v3.CreateSecuritySettingsRequest = (function() { /** - * Properties of a GetVersionRequest. + * Properties of a CreateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IGetVersionRequest - * @property {string|null} [name] GetVersionRequest name + * @interface ICreateSecuritySettingsRequest + * @property {string|null} [parent] CreateSecuritySettingsRequest parent + * @property {google.cloud.dialogflow.cx.v3.ISecuritySettings|null} [securitySettings] CreateSecuritySettingsRequest securitySettings */ /** - * Constructs a new GetVersionRequest. + * Constructs a new CreateSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a GetVersionRequest. - * @implements IGetVersionRequest + * @classdesc Represents a CreateSecuritySettingsRequest. + * @implements ICreateSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set */ - function GetVersionRequest(properties) { + function CreateSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78506,75 +80656,89 @@ } /** - * GetVersionRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * CreateSecuritySettingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance */ - GetVersionRequest.prototype.name = ""; + CreateSecuritySettingsRequest.prototype.parent = ""; /** - * Creates a new GetVersionRequest 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.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest instance */ - GetVersionRequest.create = function create(properties) { - return new GetVersionRequest(properties); + CreateSecuritySettingsRequest.create = function create(properties) { + return new CreateSecuritySettingsRequest(properties); }; /** - * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.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.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest 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 */ - GetVersionRequest.encode = function encode(message, writer) { + CreateSecuritySettingsRequest.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.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 GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.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.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest 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 */ - GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVersionRequest 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.GetVersionRequest + * @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.GetVersionRequest} GetVersionRequest + * @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 */ - GetVersionRequest.decode = function decode(reader, length) { + CreateSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); + 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(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.securitySettings = $root.google.cloud.dialogflow.cx.v3.SecuritySettings.decode(reader, reader.uint32()); break; } default: @@ -78586,123 +80750,136 @@ }; /** - * Decodes a GetVersionRequest 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.GetVersionRequest + * @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.GetVersionRequest} GetVersionRequest + * @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 */ - GetVersionRequest.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 GetVersionRequest message. + * Verifies a CreateSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @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 */ - GetVersionRequest.verify = function verify(message) { + CreateSecuritySettingsRequest.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.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 GetVersionRequest 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.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} CreateSecuritySettingsRequest */ - GetVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetVersionRequest) + 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.GetVersionRequest(); - if (object.name != null) - message.name = String(object.name); + 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 GetVersionRequest 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.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.GetVersionRequest} message GetVersionRequest + * @param {google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest} message CreateSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVersionRequest.toObject = function toObject(message, options) { + CreateSecuritySettingsRequest.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.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 GetVersionRequest to JSON. + * Converts this CreateSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - GetVersionRequest.prototype.toJSON = function toJSON() { + CreateSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetVersionRequest + * Gets the default type url for CreateSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetVersionRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateSecuritySettingsRequest"; }; - return GetVersionRequest; + return CreateSecuritySettingsRequest; })(); - v3.CreateVersionRequest = (function() { + v3.DeleteSecuritySettingsRequest = (function() { /** - * Properties of a CreateVersionRequest. + * Properties of a DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICreateVersionRequest - * @property {string|null} [parent] CreateVersionRequest parent - * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] CreateVersionRequest version + * @interface IDeleteSecuritySettingsRequest + * @property {string|null} [name] DeleteSecuritySettingsRequest name */ /** - * Constructs a new CreateVersionRequest. + * Constructs a new DeleteSecuritySettingsRequest. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CreateVersionRequest. - * @implements ICreateVersionRequest + * @classdesc Represents a DeleteSecuritySettingsRequest. + * @implements IDeleteSecuritySettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set */ - function CreateVersionRequest(properties) { + function DeleteSecuritySettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78710,89 +80887,75 @@ } /** - * CreateVersionRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest - * @instance - */ - CreateVersionRequest.prototype.parent = ""; - - /** - * CreateVersionRequest version. - * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * DeleteSecuritySettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance */ - CreateVersionRequest.prototype.version = null; + DeleteSecuritySettingsRequest.prototype.name = ""; /** - * Creates a new CreateVersionRequest instance using the specified properties. + * Creates a new DeleteSecuritySettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteSecuritySettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest instance */ - CreateVersionRequest.create = function create(properties) { - return new CreateVersionRequest(properties); + DeleteSecuritySettingsRequest.create = function create(properties) { + return new DeleteSecuritySettingsRequest(properties); }; /** - * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.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.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest 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 */ - CreateVersionRequest.encode = function encode(message, writer) { + DeleteSecuritySettingsRequest.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.version != null && Object.hasOwnProperty.call(message, "version")) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, 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 CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.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.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest 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 */ - CreateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSecuritySettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateVersionRequest 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.CreateVersionRequest + * @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.CreateVersionRequest} CreateVersionRequest + * @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 */ - CreateVersionRequest.decode = function decode(reader, length) { + DeleteSecuritySettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); + 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(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -78804,137 +80967,133 @@ }; /** - * Decodes a CreateVersionRequest 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.CreateVersionRequest + * @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.CreateVersionRequest} CreateVersionRequest + * @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 */ - CreateVersionRequest.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 CreateVersionRequest message. + * Verifies a DeleteSecuritySettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @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 */ - CreateVersionRequest.verify = function verify(message) { + DeleteSecuritySettingsRequest.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.version != null && message.hasOwnProperty("version")) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); - if (error) - return "version." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateVersionRequest 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.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} DeleteSecuritySettingsRequest */ - CreateVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest) + 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.CreateVersionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CreateVersionRequest.version: object expected"); - message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); - } + 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 CreateVersionRequest 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.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3.CreateVersionRequest} message CreateVersionRequest + * @param {google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest} message DeleteSecuritySettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateVersionRequest.toObject = function toObject(message, options) { + DeleteSecuritySettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.version = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateVersionRequest to JSON. + * Converts this DeleteSecuritySettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @instance * @returns {Object.} JSON object */ - CreateVersionRequest.prototype.toJSON = function toJSON() { + DeleteSecuritySettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateVersionRequest + * Gets the default type url for DeleteSecuritySettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteSecuritySettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateVersionRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteSecuritySettingsRequest"; }; - return CreateVersionRequest; + return DeleteSecuritySettingsRequest; })(); - v3.UpdateVersionRequest = (function() { + v3.SecuritySettings = (function() { /** - * Properties of an UpdateVersionRequest. + * Properties of a SecuritySettings. * @memberof google.cloud.dialogflow.cx.v3 - * @interface IUpdateVersionRequest - * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] UpdateVersionRequest version - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask + * @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 UpdateVersionRequest. + * Constructs a new SecuritySettings. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents an UpdateVersionRequest. - * @implements IUpdateVersionRequest + * @classdesc Represents a SecuritySettings. + * @implements ISecuritySettings * @constructor - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set */ - function UpdateVersionRequest(properties) { + function SecuritySettings(properties) { + this.purgeDataTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78942,306 +81101,188 @@ } /** - * UpdateVersionRequest version. - * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * SecuritySettings name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - UpdateVersionRequest.prototype.version = null; + SecuritySettings.prototype.name = ""; /** - * UpdateVersionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * SecuritySettings displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - UpdateVersionRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateVersionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest instance - */ - UpdateVersionRequest.create = function create(properties) { - return new UpdateVersionRequest(properties); - }; - - /** - * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVersionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, 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; - }; + SecuritySettings.prototype.displayName = ""; /** - * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * SecuritySettings redactionStrategy. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy} redactionStrategy + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + SecuritySettings.prototype.redactionStrategy = 0; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * SecuritySettings redactionScope. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope} redactionScope + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = $root.google.cloud.dialogflow.cx.v3.Version.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; - }; + SecuritySettings.prototype.redactionScope = 0; /** - * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * SecuritySettings inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + SecuritySettings.prototype.inspectTemplate = ""; /** - * Verifies an UpdateVersionRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * SecuritySettings deidentifyTemplate. + * @member {string} deidentifyTemplate + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + SecuritySettings.prototype.deidentifyTemplate = ""; /** - * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * SecuritySettings retentionWindowDays. + * @member {number|null|undefined} retentionWindowDays + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.version: object expected"); - message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + SecuritySettings.prototype.retentionWindowDays = null; /** - * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} message UpdateVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * SecuritySettings retentionStrategy. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.RetentionStrategy|null|undefined} retentionStrategy + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = null; - object.updateMask = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + SecuritySettings.prototype.retentionStrategy = null; /** - * Converts this UpdateVersionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * SecuritySettings purgeDataTypes. + * @member {Array.} purgeDataTypes + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance - * @returns {Object.} JSON object */ - UpdateVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + SecuritySettings.prototype.purgeDataTypes = $util.emptyArray; /** - * Gets the default type url for UpdateVersionRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * SecuritySettings audioExportSettings. + * @member {google.cloud.dialogflow.cx.v3.SecuritySettings.IAudioExportSettings|null|undefined} audioExportSettings + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @instance */ - UpdateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateVersionRequest"; - }; - - return UpdateVersionRequest; - })(); - - v3.DeleteVersionRequest = (function() { + SecuritySettings.prototype.audioExportSettings = null; /** - * Properties of a DeleteVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface IDeleteVersionRequest - * @property {string|null} [name] DeleteVersionRequest name + * 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; - /** - * Constructs a new DeleteVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a DeleteVersionRequest. - * @implements IDeleteVersionRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set - */ - function DeleteVersionRequest(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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeleteVersionRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * SecuritySettings dataRetention. + * @member {"retentionWindowDays"|"retentionStrategy"|undefined} dataRetention + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance */ - DeleteVersionRequest.prototype.name = ""; + Object.defineProperty(SecuritySettings.prototype, "dataRetention", { + get: $util.oneOfGetter($oneOfFields = ["retentionWindowDays", "retentionStrategy"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeleteVersionRequest instance using the specified properties. + * Creates a new SecuritySettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest instance + * @param {google.cloud.dialogflow.cx.v3.ISecuritySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings instance */ - DeleteVersionRequest.create = function create(properties) { - return new DeleteVersionRequest(properties); + SecuritySettings.create = function create(properties) { + return new SecuritySettings(properties); }; /** - * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.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.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest 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 */ - DeleteVersionRequest.encode = function encode(message, writer) { + SecuritySettings.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 DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.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.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest 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 */ - DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteVersionRequest 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.DeleteVersionRequest + * @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.DeleteVersionRequest} DeleteVersionRequest + * @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 */ - DeleteVersionRequest.decode = function decode(reader, length) { + SecuritySettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + 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(); switch (tag >>> 3) { @@ -79249,6 +81290,53 @@ 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; @@ -79258,351 +81346,1158 @@ }; /** - * Decodes a DeleteVersionRequest 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.DeleteVersionRequest + * @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.DeleteVersionRequest} DeleteVersionRequest + * @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 */ - DeleteVersionRequest.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 DeleteVersionRequest message. + * Verifies a SecuritySettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @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 */ - DeleteVersionRequest.verify = function verify(message) { + SecuritySettings.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 DeleteVersionRequest 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.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @returns {google.cloud.dialogflow.cx.v3.SecuritySettings} SecuritySettings */ - DeleteVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest) + 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.DeleteVersionRequest(); + 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); + } return message; }; /** - * Creates a plain object from a DeleteVersionRequest 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.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static - * @param {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} message DeleteVersionRequest + * @param {google.cloud.dialogflow.cx.v3.SecuritySettings} message SecuritySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteVersionRequest.toObject = function toObject(message, options) { + SecuritySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.purgeDataTypes = []; + 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 DeleteVersionRequest to JSON. + * Converts this SecuritySettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @instance * @returns {Object.} JSON object */ - DeleteVersionRequest.prototype.toJSON = function toJSON() { + SecuritySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteVersionRequest + * Gets the default type url for SecuritySettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteVersionRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.SecuritySettings"; }; - return DeleteVersionRequest; - })(); - - v3.LoadVersionRequest = (function() { - /** - * Properties of a LoadVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @interface ILoadVersionRequest - * @property {string|null} [name] LoadVersionRequest name - * @property {boolean|null} [allowOverrideAgentResources] LoadVersionRequest allowOverrideAgentResources + * 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; + })(); /** - * Constructs a new LoadVersionRequest. - * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a LoadVersionRequest. - * @implements ILoadVersionRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set + * 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 */ - function LoadVersionRequest(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]]; - } + 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; + })(); /** - * LoadVersionRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @instance + * 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 */ - LoadVersionRequest.prototype.name = ""; + 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; + })(); /** - * LoadVersionRequest allowOverrideAgentResources. - * @member {boolean} allowOverrideAgentResources - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @instance + * 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 */ - LoadVersionRequest.prototype.allowOverrideAgentResources = false; + 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; + })(); - /** - * Creates a new LoadVersionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest instance - */ - LoadVersionRequest.create = function create(properties) { - return new LoadVersionRequest(properties); - }; + SecuritySettings.AudioExportSettings = (function() { - /** - * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadVersionRequest.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.allowOverrideAgentResources != null && Object.hasOwnProperty.call(message, "allowOverrideAgentResources")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowOverrideAgentResources); - 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 + */ - /** - * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadVersionRequest.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 LoadVersionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadVersionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * 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; + + /** + * 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); + 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) { + if (!(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(); + 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; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.allowOverrideAgentResources = reader.bool(); + } + 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; } + 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: - reader.skipType(tag & 7); + 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; } + 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; + } + 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; + 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; + })(); + + SecuritySettings.InsightsExportSettings = (function() { + + /** + * Properties of an InsightsExportSettings. + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings + * @interface IInsightsExportSettings + * @property {boolean|null} [enableInsightsExport] InsightsExportSettings enableInsightsExport + */ + + /** + * 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]]; } - return message; - }; + + /** + * InsightsExportSettings enableInsightsExport. + * @member {boolean} enableInsightsExport + * @memberof google.cloud.dialogflow.cx.v3.SecuritySettings.InsightsExportSettings + * @instance + */ + InsightsExportSettings.prototype.enableInsightsExport = false; + + /** + * 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); + }; + + /** + * 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 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(); + }; + + /** + * 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) { + if (!(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(); + switch (tag >>> 3) { + case 1: { + message.enableInsightsExport = reader.bool(); + 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()); + }; + + /** + * 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; + }; + + /** + * 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; + }; + + /** + * 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; + return object; + }; + + /** + * 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); + }; + + /** + * 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"; + }; + + return InsightsExportSettings; + })(); + + return SecuritySettings; + })(); + + v3.Versions = (function() { /** - * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new Versions service. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a Versions + * @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 */ - LoadVersionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + function Versions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Versions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Versions; /** - * Verifies a LoadVersionRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest + * Creates new Versions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Versions * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @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 {Versions} RPC service. Useful where requests and/or responses are streamed. */ - LoadVersionRequest.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.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) - if (typeof message.allowOverrideAgentResources !== "boolean") - return "allowOverrideAgentResources: boolean expected"; - return null; + Versions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|listVersions}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} [response] ListVersionsResponse */ - LoadVersionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.allowOverrideAgentResources != null) - message.allowOverrideAgentResources = Boolean(object.allowOverrideAgentResources); - return message; - }; /** - * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @static - * @param {google.cloud.dialogflow.cx.v3.LoadVersionRequest} message LoadVersionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.ListVersionsCallback} callback Node-style callback called with the error, if any, and ListVersionsResponse + * @returns {undefined} + * @variation 1 */ - LoadVersionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.allowOverrideAgentResources = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) - object.allowOverrideAgentResources = message.allowOverrideAgentResources; - return object; - }; + Object.defineProperty(Versions.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest, $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse, request, callback); + }, "name", { value: "ListVersions" }); /** - * Converts this LoadVersionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - LoadVersionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for LoadVersionRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest - * @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.Versions|getVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version */ - LoadVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LoadVersionRequest"; - }; - return LoadVersionRequest; + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.GetVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.cloud.dialogflow.cx.v3.GetVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); + }, "name", { value: "GetVersion" }); + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|createVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef CreateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.CreateVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.createVersion = function createVersion(request, callback) { + return this.rpcCall(createVersion, $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVersion" }); + + /** + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|updateVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef UpdateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.Version} [response] Version + */ + + /** + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.UpdateVersionCallback} callback Node-style callback called with the error, if any, and Version + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.updateVersion = function updateVersion(request, callback) { + return this.rpcCall(updateVersion, $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest, $root.google.cloud.dialogflow.cx.v3.Version, request, callback); + }, "name", { value: "UpdateVersion" }); + + /** + * Calls UpdateVersion. + * @function updateVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} request UpdateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|deleteVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.DeleteVersionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteVersion" }); + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|loadVersion}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef LoadVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls LoadVersion. + * @function loadVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.LoadVersionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.loadVersion = function loadVersion(request, callback) { + return this.rpcCall(loadVersion, $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "LoadVersion" }); + + /** + * Calls LoadVersion. + * @function loadVersion + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} request LoadVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3.Versions|compareVersions}. + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @typedef CompareVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} [response] CompareVersionsResponse + */ + + /** + * Calls CompareVersions. + * @function compareVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} request CompareVersionsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3.Versions.CompareVersionsCallback} callback Node-style callback called with the error, if any, and CompareVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Versions.prototype.compareVersions = function compareVersions(request, callback) { + return this.rpcCall(compareVersions, $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest, $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse, request, callback); + }, "name", { value: "CompareVersions" }); + + /** + * Calls CompareVersions. + * @function compareVersions + * @memberof google.cloud.dialogflow.cx.v3.Versions + * @instance + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} request CompareVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Versions; })(); - v3.CompareVersionsRequest = (function() { + v3.CreateVersionOperationMetadata = (function() { /** - * Properties of a CompareVersionsRequest. + * Properties of a CreateVersionOperationMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICompareVersionsRequest - * @property {string|null} [baseVersion] CompareVersionsRequest baseVersion - * @property {string|null} [targetVersion] CompareVersionsRequest targetVersion - * @property {string|null} [languageCode] CompareVersionsRequest languageCode + * @interface ICreateVersionOperationMetadata + * @property {string|null} [version] CreateVersionOperationMetadata version */ /** - * Constructs a new CompareVersionsRequest. + * Constructs a new CreateVersionOperationMetadata. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CompareVersionsRequest. - * @implements ICompareVersionsRequest + * @classdesc Represents a CreateVersionOperationMetadata. + * @implements ICreateVersionOperationMetadata * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set */ - function CompareVersionsRequest(properties) { + function CreateVersionOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79610,103 +82505,75 @@ } /** - * CompareVersionsRequest baseVersion. - * @member {string} baseVersion - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest - * @instance - */ - CompareVersionsRequest.prototype.baseVersion = ""; - - /** - * CompareVersionsRequest targetVersion. - * @member {string} targetVersion - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest - * @instance - */ - CompareVersionsRequest.prototype.targetVersion = ""; - - /** - * CompareVersionsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * CreateVersionOperationMetadata version. + * @member {string} version + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @instance */ - CompareVersionsRequest.prototype.languageCode = ""; + CreateVersionOperationMetadata.prototype.version = ""; /** - * Creates a new CompareVersionsRequest instance using the specified properties. + * Creates a new CreateVersionOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata instance */ - CompareVersionsRequest.create = function create(properties) { - return new CompareVersionsRequest(properties); + CreateVersionOperationMetadata.create = function create(properties) { + return new CreateVersionOperationMetadata(properties); }; /** - * Encodes the specified CompareVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * Encodes the specified CreateVersionOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} message CompareVersionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompareVersionsRequest.encode = function encode(message, writer) { + CreateVersionOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseVersion != null && Object.hasOwnProperty.call(message, "baseVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseVersion); - if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetVersion); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); return writer; }; /** - * Encodes the specified CompareVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * Encodes the specified CreateVersionOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} message CompareVersionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionOperationMetadata} message CreateVersionOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompareVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateVersionOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompareVersionsRequest message from the specified reader or buffer. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompareVersionsRequest.decode = function decode(reader, length) { + CreateVersionOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.baseVersion = reader.string(); - break; - } - case 2: { - message.targetVersion = reader.string(); - break; - } - case 3: { - message.languageCode = reader.string(); + message.version = reader.string(); break; } default: @@ -79718,141 +82585,127 @@ }; /** - * Decodes a CompareVersionsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateVersionOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompareVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateVersionOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompareVersionsRequest message. + * Verifies a CreateVersionOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompareVersionsRequest.verify = function verify(message) { + CreateVersionOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseVersion != null && message.hasOwnProperty("baseVersion")) - if (!$util.isString(message.baseVersion)) - return "baseVersion: string expected"; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - if (!$util.isString(message.targetVersion)) - return "targetVersion: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates a CompareVersionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVersionOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} CreateVersionOperationMetadata */ - CompareVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest) + CreateVersionOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest(); - if (object.baseVersion != null) - message.baseVersion = String(object.baseVersion); - if (object.targetVersion != null) - message.targetVersion = String(object.targetVersion); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata(); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from a CompareVersionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateVersionOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static - * @param {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} message CompareVersionsRequest + * @param {google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata} message CreateVersionOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompareVersionsRequest.toObject = function toObject(message, options) { + CreateVersionOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.baseVersion = ""; - object.targetVersion = ""; - object.languageCode = ""; - } - if (message.baseVersion != null && message.hasOwnProperty("baseVersion")) - object.baseVersion = message.baseVersion; - if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) - object.targetVersion = message.targetVersion; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this CompareVersionsRequest to JSON. + * Converts this CreateVersionOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @instance * @returns {Object.} JSON object */ - CompareVersionsRequest.prototype.toJSON = function toJSON() { + CreateVersionOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompareVersionsRequest + * Gets the default type url for CreateVersionOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompareVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateVersionOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CompareVersionsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata"; }; - return CompareVersionsRequest; + return CreateVersionOperationMetadata; })(); - v3.CompareVersionsResponse = (function() { + v3.Version = (function() { /** - * Properties of a CompareVersionsResponse. + * Properties of a Version. * @memberof google.cloud.dialogflow.cx.v3 - * @interface ICompareVersionsResponse - * @property {string|null} [baseVersionContentJson] CompareVersionsResponse baseVersionContentJson - * @property {string|null} [targetVersionContentJson] CompareVersionsResponse targetVersionContentJson - * @property {google.protobuf.ITimestamp|null} [compareTime] CompareVersionsResponse compareTime + * @interface IVersion + * @property {string|null} [name] Version name + * @property {string|null} [displayName] Version displayName + * @property {string|null} [description] Version description + * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Version nluSettings + * @property {google.protobuf.ITimestamp|null} [createTime] Version createTime + * @property {google.cloud.dialogflow.cx.v3.Version.State|null} [state] Version state */ /** - * Constructs a new CompareVersionsResponse. + * Constructs a new Version. * @memberof google.cloud.dialogflow.cx.v3 - * @classdesc Represents a CompareVersionsResponse. - * @implements ICompareVersionsResponse + * @classdesc Represents a Version. + * @implements IVersion * @constructor - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set */ - function CompareVersionsResponse(properties) { + function Version(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79860,103 +82713,145 @@ } /** - * CompareVersionsResponse baseVersionContentJson. - * @member {string} baseVersionContentJson - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * Version name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.Version * @instance */ - CompareVersionsResponse.prototype.baseVersionContentJson = ""; + Version.prototype.name = ""; /** - * CompareVersionsResponse targetVersionContentJson. - * @member {string} targetVersionContentJson - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * Version displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3.Version * @instance */ - CompareVersionsResponse.prototype.targetVersionContentJson = ""; + Version.prototype.displayName = ""; /** - * CompareVersionsResponse compareTime. - * @member {google.protobuf.ITimestamp|null|undefined} compareTime - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * Version description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3.Version * @instance */ - CompareVersionsResponse.prototype.compareTime = null; + Version.prototype.description = ""; /** - * Creates a new CompareVersionsResponse instance using the specified properties. + * Version nluSettings. + * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.nluSettings = null; + + /** + * Version createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.createTime = null; + + /** + * Version state. + * @member {google.cloud.dialogflow.cx.v3.Version.State} state + * @memberof google.cloud.dialogflow.cx.v3.Version + * @instance + */ + Version.prototype.state = 0; + + /** + * Creates a new Version instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse instance + * @param {google.cloud.dialogflow.cx.v3.IVersion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Version} Version instance */ - CompareVersionsResponse.create = function create(properties) { - return new CompareVersionsResponse(properties); + Version.create = function create(properties) { + return new Version(properties); }; /** - * Encodes the specified CompareVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. + * Encodes the specified Version message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse} message CompareVersionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompareVersionsResponse.encode = function encode(message, writer) { + Version.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseVersionContentJson != null && Object.hasOwnProperty.call(message, "baseVersionContentJson")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseVersionContentJson); - if (message.targetVersionContentJson != null && Object.hasOwnProperty.call(message, "targetVersionContentJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetVersionContentJson); - if (message.compareTime != null && Object.hasOwnProperty.call(message, "compareTime")) - $root.google.protobuf.Timestamp.encode(message.compareTime, writer.uint32(/* id 3, wireType 2 =*/26).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.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); return writer; }; /** - * Encodes the specified CompareVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. + * Encodes the specified Version message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Version.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static - * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse} message CompareVersionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IVersion} message Version message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompareVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + Version.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompareVersionsResponse message from the specified reader or buffer. + * Decodes a Version message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.Version} Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompareVersionsResponse.decode = function decode(reader, length) { + Version.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Version(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.baseVersionContentJson = reader.string(); + message.name = reader.string(); break; } case 2: { - message.targetVersionContentJson = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.compareTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.description = reader.string(); + break; + } + case 4: { + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = reader.int32(); break; } default: @@ -79968,158 +82863,222 @@ }; /** - * Decodes a CompareVersionsResponse message from the specified reader or buffer, length delimited. + * Decodes a Version message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.Version} Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompareVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + Version.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompareVersionsResponse message. + * Verifies a Version message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompareVersionsResponse.verify = function verify(message) { + Version.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseVersionContentJson != null && message.hasOwnProperty("baseVersionContentJson")) - if (!$util.isString(message.baseVersionContentJson)) - return "baseVersionContentJson: string expected"; - if (message.targetVersionContentJson != null && message.hasOwnProperty("targetVersionContentJson")) - if (!$util.isString(message.targetVersionContentJson)) - return "targetVersionContentJson: string expected"; - if (message.compareTime != null && message.hasOwnProperty("compareTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.compareTime); + 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.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); if (error) - return "compareTime." + error; + return "nluSettings." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } + 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; + } return null; }; /** - * Creates a CompareVersionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Version message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse + * @returns {google.cloud.dialogflow.cx.v3.Version} Version */ - CompareVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse) + Version.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Version) return object; - var message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse(); - if (object.baseVersionContentJson != null) - message.baseVersionContentJson = String(object.baseVersionContentJson); - if (object.targetVersionContentJson != null) - message.targetVersionContentJson = String(object.targetVersionContentJson); - if (object.compareTime != null) { - if (typeof object.compareTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3.CompareVersionsResponse.compareTime: object expected"); - message.compareTime = $root.google.protobuf.Timestamp.fromObject(object.compareTime); + var message = new $root.google.cloud.dialogflow.cx.v3.Version(); + 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.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Version.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.fromObject(object.nluSettings); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Version.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + 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 "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; } return message; }; /** - * Creates a plain object from a CompareVersionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a Version message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static - * @param {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} message CompareVersionsResponse + * @param {google.cloud.dialogflow.cx.v3.Version} message Version * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompareVersionsResponse.toObject = function toObject(message, options) { + Version.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.baseVersionContentJson = ""; - object.targetVersionContentJson = ""; - object.compareTime = null; + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.baseVersionContentJson != null && message.hasOwnProperty("baseVersionContentJson")) - object.baseVersionContentJson = message.baseVersionContentJson; - if (message.targetVersionContentJson != null && message.hasOwnProperty("targetVersionContentJson")) - object.targetVersionContentJson = message.targetVersionContentJson; - if (message.compareTime != null && message.hasOwnProperty("compareTime")) - object.compareTime = $root.google.protobuf.Timestamp.toObject(message.compareTime, 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; return object; }; /** - * Converts this CompareVersionsResponse to JSON. + * Converts this Version to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @instance * @returns {Object.} JSON object */ - CompareVersionsResponse.prototype.toJSON = function toJSON() { + Version.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompareVersionsResponse + * Gets the default type url for Version * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @memberof google.cloud.dialogflow.cx.v3.Version * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompareVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Version.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CompareVersionsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Version"; }; - return CompareVersionsResponse; - })(); - - return v3; - })(); - - cx.v3beta1 = (function() { + /** + * State enum. + * @name google.cloud.dialogflow.cx.v3.Version.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 + */ + Version.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; + })(); - /** - * Namespace v3beta1. - * @memberof google.cloud.dialogflow.cx - * @namespace - */ - var v3beta1 = {}; + return Version; + })(); - v3beta1.AdvancedSettings = (function() { + v3.ListVersionsRequest = (function() { /** - * Properties of an AdvancedSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IAdvancedSettings - * @property {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null} [audioExportGcsDestination] AdvancedSettings audioExportGcsDestination - * @property {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null} [dtmfSettings] AdvancedSettings dtmfSettings - * @property {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null} [loggingSettings] AdvancedSettings loggingSettings + * Properties of a ListVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {number|null} [pageSize] ListVersionsRequest pageSize + * @property {string|null} [pageToken] ListVersionsRequest pageToken */ /** - * Constructs a new AdvancedSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an AdvancedSettings. - * @implements IAdvancedSettings + * Constructs a new ListVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set */ - function AdvancedSettings(properties) { + function ListVersionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80127,103 +83086,103 @@ } /** - * AdvancedSettings audioExportGcsDestination. - * @member {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null|undefined} audioExportGcsDestination - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * ListVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance */ - AdvancedSettings.prototype.audioExportGcsDestination = null; + ListVersionsRequest.prototype.parent = ""; /** - * AdvancedSettings dtmfSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null|undefined} dtmfSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * ListVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance */ - AdvancedSettings.prototype.dtmfSettings = null; + ListVersionsRequest.prototype.pageSize = 0; /** - * AdvancedSettings loggingSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null|undefined} loggingSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * ListVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance */ - AdvancedSettings.prototype.loggingSettings = null; + ListVersionsRequest.prototype.pageToken = ""; /** - * Creates a new AdvancedSettings instance using the specified properties. + * Creates a new ListVersionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings instance + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest instance */ - AdvancedSettings.create = function create(properties) { - return new AdvancedSettings(properties); + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); }; /** - * Encodes the specified AdvancedSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings} message AdvancedSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvancedSettings.encode = function encode(message, writer) { + ListVersionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioExportGcsDestination != null && Object.hasOwnProperty.call(message, "audioExportGcsDestination")) - $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.encode(message.audioExportGcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dtmfSettings != null && Object.hasOwnProperty.call(message, "dtmfSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.encode(message.dtmfSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.loggingSettings != null && Object.hasOwnProperty.call(message, "loggingSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.encode(message.loggingSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + 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 AdvancedSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings} message AdvancedSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IListVersionsRequest} message ListVersionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvancedSettings.encodeDelimited = function encodeDelimited(message, writer) { + ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvancedSettings message from the specified reader or buffer. + * Decodes a ListVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvancedSettings.decode = function decode(reader, length) { + ListVersionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.decode(reader, reader.uint32()); + case 1: { + message.parent = reader.string(); break; } - case 5: { - message.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.decode(reader, reader.uint32()); + case 2: { + message.pageSize = reader.int32(); break; } - case 6: { - message.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.decode(reader, reader.uint32()); + case 3: { + message.pageToken = reader.string(); break; } default: @@ -80235,631 +83194,387 @@ }; /** - * Decodes an AdvancedSettings message from the specified reader or buffer, length delimited. + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvancedSettings.decodeDelimited = function decodeDelimited(reader) { + ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvancedSettings message. + * Verifies a ListVersionsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvancedSettings.verify = function verify(message) { + ListVersionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify(message.audioExportGcsDestination); - if (error) - return "audioExportGcsDestination." + error; - } - if (message.dtmfSettings != null && message.hasOwnProperty("dtmfSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify(message.dtmfSettings); - if (error) - return "dtmfSettings." + error; - } - if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify(message.loggingSettings); - if (error) - return "loggingSettings." + error; - } + 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 an AdvancedSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsRequest} ListVersionsRequest */ - AdvancedSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings) + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings(); - if (object.audioExportGcsDestination != null) { - if (typeof object.audioExportGcsDestination !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.audioExportGcsDestination: object expected"); - message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.fromObject(object.audioExportGcsDestination); - } - if (object.dtmfSettings != null) { - if (typeof object.dtmfSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.dtmfSettings: object expected"); - message.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.fromObject(object.dtmfSettings); - } - if (object.loggingSettings != null) { - if (typeof object.loggingSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.loggingSettings: object expected"); - message.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.fromObject(object.loggingSettings); - } + var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsRequest(); + 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 an AdvancedSettings message. Also converts values to other types if specified. + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} message AdvancedSettings + * @param {google.cloud.dialogflow.cx.v3.ListVersionsRequest} message ListVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvancedSettings.toObject = function toObject(message, options) { + ListVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioExportGcsDestination = null; - object.dtmfSettings = null; - object.loggingSettings = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) - object.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.toObject(message.audioExportGcsDestination, options); - if (message.dtmfSettings != null && message.hasOwnProperty("dtmfSettings")) - object.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.toObject(message.dtmfSettings, options); - if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) - object.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.toObject(message.loggingSettings, options); + 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 AdvancedSettings to JSON. + * Converts this ListVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @instance * @returns {Object.} JSON object */ - AdvancedSettings.prototype.toJSON = function toJSON() { + ListVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvancedSettings + * Gets the default type url for ListVersionsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvancedSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListVersionsRequest"; }; - AdvancedSettings.DtmfSettings = (function() { + return ListVersionsRequest; + })(); - /** - * Properties of a DtmfSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings - * @interface IDtmfSettings - * @property {boolean|null} [enabled] DtmfSettings enabled - * @property {number|null} [maxDigits] DtmfSettings maxDigits - * @property {string|null} [finishDigit] DtmfSettings finishDigit - */ + v3.ListVersionsResponse = (function() { - /** - * Constructs a new DtmfSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings - * @classdesc Represents a DtmfSettings. - * @implements IDtmfSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings=} [properties] Properties to set - */ - function DtmfSettings(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 ListVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IListVersionsResponse + * @property {Array.|null} [versions] ListVersionsResponse versions + * @property {string|null} [nextPageToken] ListVersionsResponse nextPageToken + */ - /** - * DtmfSettings enabled. - * @member {boolean} enabled - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @instance - */ - DtmfSettings.prototype.enabled = false; + /** + * Constructs a new ListVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a ListVersionsResponse. + * @implements IListVersionsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set + */ + function ListVersionsResponse(properties) { + this.versions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DtmfSettings maxDigits. - * @member {number} maxDigits - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @instance - */ - DtmfSettings.prototype.maxDigits = 0; + /** + * ListVersionsResponse versions. + * @member {Array.} versions + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.versions = $util.emptyArray; - /** - * DtmfSettings finishDigit. - * @member {string} finishDigit - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @instance - */ - DtmfSettings.prototype.finishDigit = ""; + /** + * ListVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @instance + */ + ListVersionsResponse.prototype.nextPageToken = ""; - /** - * Creates a new DtmfSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings instance - */ - DtmfSettings.create = function create(properties) { - return new DtmfSettings(properties); - }; + /** + * Creates a new ListVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse instance + */ + ListVersionsResponse.create = function create(properties) { + return new ListVersionsResponse(properties); + }; - /** - * Encodes the specified DtmfSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings} message DtmfSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DtmfSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.maxDigits != null && Object.hasOwnProperty.call(message, "maxDigits")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDigits); - if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.finishDigit); - return writer; - }; + /** + * Encodes the specified ListVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.versions[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 DtmfSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings} message DtmfSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DtmfSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.ListVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.IListVersionsResponse} message ListVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DtmfSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DtmfSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.maxDigits = reader.int32(); - break; - } - case 3: { - message.finishDigit = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DtmfSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DtmfSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DtmfSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DtmfSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.maxDigits != null && message.hasOwnProperty("maxDigits")) - if (!$util.isInteger(message.maxDigits)) - return "maxDigits: integer expected"; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - if (!$util.isString(message.finishDigit)) - return "finishDigit: string expected"; - return null; - }; + } + return message; + }; - /** - * Creates a DtmfSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings - */ - DtmfSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.maxDigits != null) - message.maxDigits = object.maxDigits | 0; - if (object.finishDigit != null) - message.finishDigit = String(object.finishDigit); - return message; - }; + /** + * Decodes a ListVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a DtmfSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} message DtmfSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DtmfSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.maxDigits = 0; - object.finishDigit = ""; + /** + * Verifies a ListVersionsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.versions[i]); + if (error) + return "versions." + error; } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.maxDigits != null && message.hasOwnProperty("maxDigits")) - object.maxDigits = message.maxDigits; - if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) - object.finishDigit = message.finishDigit; - return object; - }; - - /** - * Converts this DtmfSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @instance - * @returns {Object.} JSON object - */ - DtmfSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Gets the default type url for DtmfSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DtmfSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates a ListVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.ListVersionsResponse} ListVersionsResponse + */ + ListVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.ListVersionsResponse(); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.ListVersionsResponse.versions: object expected"); + message.versions[i] = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.versions[i]); } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings"; - }; - - return DtmfSettings; - })(); - - AdvancedSettings.LoggingSettings = (function() { - - /** - * Properties of a LoggingSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings - * @interface ILoggingSettings - * @property {boolean|null} [enableStackdriverLogging] LoggingSettings enableStackdriverLogging - * @property {boolean|null} [enableInteractionLogging] LoggingSettings enableInteractionLogging - */ - - /** - * Constructs a new LoggingSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings - * @classdesc Represents a LoggingSettings. - * @implements ILoggingSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings=} [properties] Properties to set - */ - function LoggingSettings(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 (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * LoggingSettings enableStackdriverLogging. - * @member {boolean} enableStackdriverLogging - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @instance - */ - LoggingSettings.prototype.enableStackdriverLogging = false; - - /** - * LoggingSettings enableInteractionLogging. - * @member {boolean} enableInteractionLogging - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @instance - */ - LoggingSettings.prototype.enableInteractionLogging = false; - - /** - * Creates a new LoggingSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings instance - */ - LoggingSettings.create = function create(properties) { - return new LoggingSettings(properties); - }; - - /** - * Encodes the specified LoggingSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings} message LoggingSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableStackdriverLogging); - if (message.enableInteractionLogging != null && Object.hasOwnProperty.call(message, "enableInteractionLogging")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableInteractionLogging); - return writer; - }; - - /** - * Encodes the specified LoggingSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings} message LoggingSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoggingSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoggingSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.enableStackdriverLogging = reader.bool(); - break; - } - case 3: { - message.enableInteractionLogging = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoggingSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoggingSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoggingSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoggingSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - if (typeof message.enableStackdriverLogging !== "boolean") - return "enableStackdriverLogging: boolean expected"; - if (message.enableInteractionLogging != null && message.hasOwnProperty("enableInteractionLogging")) - if (typeof message.enableInteractionLogging !== "boolean") - return "enableInteractionLogging: boolean expected"; - return null; - }; - - /** - * Creates a LoggingSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings - */ - LoggingSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings(); - if (object.enableStackdriverLogging != null) - message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); - if (object.enableInteractionLogging != null) - message.enableInteractionLogging = Boolean(object.enableInteractionLogging); - return message; - }; - - /** - * Creates a plain object from a LoggingSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} message LoggingSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoggingSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableStackdriverLogging = false; - object.enableInteractionLogging = false; - } - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - object.enableStackdriverLogging = message.enableStackdriverLogging; - if (message.enableInteractionLogging != null && message.hasOwnProperty("enableInteractionLogging")) - object.enableInteractionLogging = message.enableInteractionLogging; - return object; - }; - - /** - * Converts this LoggingSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @instance - * @returns {Object.} JSON object - */ - LoggingSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3.ListVersionsResponse} message ListVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.versions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Gets the default type url for LoggingSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoggingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings"; - }; + /** + * Converts this ListVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return LoggingSettings; - })(); + /** + * Gets the default type url for ListVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.ListVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.ListVersionsResponse"; + }; - return AdvancedSettings; + return ListVersionsResponse; })(); - v3beta1.GcsDestination = (function() { + v3.GetVersionRequest = (function() { /** - * Properties of a GcsDestination. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGcsDestination - * @property {string|null} [uri] GcsDestination uri + * Properties of a GetVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name */ /** - * Constructs a new GcsDestination. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination + * Constructs a new GetVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set */ - function GcsDestination(properties) { + function GetVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80867,75 +83582,75 @@ } /** - * GcsDestination uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * GetVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @instance */ - GcsDestination.prototype.uri = ""; + GetVersionRequest.prototype.name = ""; /** - * Creates a new GcsDestination instance using the specified properties. + * Creates a new GetVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination instance + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest instance */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); }; /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encode = function encode(message, writer) { + GetVersionRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.GetVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.IGetVersionRequest} message GetVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsDestination message from the specified reader or buffer. + * Decodes a GetVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decode = function decode(reader, length) { + GetVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.uri = reader.string(); + message.name = reader.string(); break; } default: @@ -80947,520 +83662,123 @@ }; /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsDestination message. + * Verifies a GetVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsDestination.verify = function verify(message) { + GetVersionRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination + * @returns {google.cloud.dialogflow.cx.v3.GetVersionRequest} GetVersionRequest */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination) + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.GetVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.dialogflow.cx.v3.GetVersionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GcsDestination} message GcsDestination + * @param {google.cloud.dialogflow.cx.v3.GetVersionRequest} message GetVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsDestination.toObject = function toObject(message, options) { + GetVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GcsDestination to JSON. + * Converts this GetVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @instance * @returns {Object.} JSON object */ - GcsDestination.prototype.toJSON = function toJSON() { + GetVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcsDestination + * Gets the default type url for GetVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination + * @memberof google.cloud.dialogflow.cx.v3.GetVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GcsDestination"; - }; - - return GcsDestination; - })(); - - v3beta1.Agents = (function() { - - /** - * Constructs a new Agents service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Agents - * @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 Agents(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Agents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Agents; - - /** - * Creates new Agents service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @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 {Agents} RPC service. Useful where requests and/or responses are streamed. - */ - Agents.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.GetVersionRequest"; }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|listAgents}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef ListAgentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} [response] ListAgentsResponse - */ - - /** - * Calls ListAgents. - * @function listAgents - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback} callback Node-style callback called with the error, if any, and ListAgentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.listAgents = function listAgents(request, callback) { - return this.rpcCall(listAgents, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, request, callback); - }, "name", { value: "ListAgents" }); - - /** - * Calls ListAgents. - * @function listAgents - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef GetAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls GetAgent. - * @function getAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.getAgent = function getAgent(request, callback) { - return this.rpcCall(getAgent, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "GetAgent" }); - - /** - * Calls GetAgent. - * @function getAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|createAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef CreateAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls CreateAgent. - * @function createAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.createAgent = function createAgent(request, callback) { - return this.rpcCall(createAgent, $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "CreateAgent" }); - - /** - * Calls CreateAgent. - * @function createAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef UpdateAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent - */ - - /** - * Calls UpdateAgent. - * @function updateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback} callback Node-style callback called with the error, if any, and Agent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.updateAgent = function updateAgent(request, callback) { - return this.rpcCall(updateAgent, $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); - }, "name", { value: "UpdateAgent" }); - - /** - * Calls UpdateAgent. - * @function updateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|deleteAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef DeleteAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteAgent. - * @function deleteAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.deleteAgent = function deleteAgent(request, callback) { - return this.rpcCall(deleteAgent, $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteAgent" }); - - /** - * Calls DeleteAgent. - * @function deleteAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|exportAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef ExportAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportAgent. - * @function exportAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.exportAgent = function exportAgent(request, callback) { - return this.rpcCall(exportAgent, $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportAgent" }); - - /** - * Calls ExportAgent. - * @function exportAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|restoreAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef RestoreAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreAgent. - * @function restoreAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.restoreAgent = function restoreAgent(request, callback) { - return this.rpcCall(restoreAgent, $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreAgent" }); - - /** - * Calls RestoreAgent. - * @function restoreAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|validateAgent}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef ValidateAgentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} [response] AgentValidationResult - */ - - /** - * Calls ValidateAgent. - * @function validateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} request ValidateAgentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgentCallback} callback Node-style callback called with the error, if any, and AgentValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.validateAgent = function validateAgent(request, callback) { - return this.rpcCall(validateAgent, $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, request, callback); - }, "name", { value: "ValidateAgent" }); - - /** - * Calls ValidateAgent. - * @function validateAgent - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} request ValidateAgentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgentValidationResult}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef GetAgentValidationResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} [response] AgentValidationResult - */ - - /** - * Calls GetAgentValidationResult. - * @function getAgentValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} request GetAgentValidationResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResultCallback} callback Node-style callback called with the error, if any, and AgentValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.getAgentValidationResult = function getAgentValidationResult(request, callback) { - return this.rpcCall(getAgentValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, request, callback); - }, "name", { value: "GetAgentValidationResult" }); - - /** - * Calls GetAgentValidationResult. - * @function getAgentValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} request GetAgentValidationResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getGenerativeSettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef GetGenerativeSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} [response] GenerativeSettings - */ - - /** - * Calls GetGenerativeSettings. - * @function getGenerativeSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} request GetGenerativeSettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettingsCallback} callback Node-style callback called with the error, if any, and GenerativeSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.getGenerativeSettings = function getGenerativeSettings(request, callback) { - return this.rpcCall(getGenerativeSettings, $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, request, callback); - }, "name", { value: "GetGenerativeSettings" }); - - /** - * Calls GetGenerativeSettings. - * @function getGenerativeSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} request GetGenerativeSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateGenerativeSettings}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @typedef UpdateGenerativeSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} [response] GenerativeSettings - */ - - /** - * Calls UpdateGenerativeSettings. - * @function updateGenerativeSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} request UpdateGenerativeSettingsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettingsCallback} callback Node-style callback called with the error, if any, and GenerativeSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Agents.prototype.updateGenerativeSettings = function updateGenerativeSettings(request, callback) { - return this.rpcCall(updateGenerativeSettings, $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, request, callback); - }, "name", { value: "UpdateGenerativeSettings" }); - - /** - * Calls UpdateGenerativeSettings. - * @function updateGenerativeSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agents - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} request UpdateGenerativeSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Agents; + return GetVersionRequest; })(); - v3beta1.SpeechToTextSettings = (function() { + v3.CreateVersionRequest = (function() { /** - * Properties of a SpeechToTextSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISpeechToTextSettings - * @property {boolean|null} [enableSpeechAdaptation] SpeechToTextSettings enableSpeechAdaptation + * Properties of a CreateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICreateVersionRequest + * @property {string|null} [parent] CreateVersionRequest parent + * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] CreateVersionRequest version */ /** - * Constructs a new SpeechToTextSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SpeechToTextSettings. - * @implements ISpeechToTextSettings + * Constructs a new CreateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CreateVersionRequest. + * @implements ICreateVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set */ - function SpeechToTextSettings(properties) { + function CreateVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81468,75 +83786,89 @@ } /** - * SpeechToTextSettings enableSpeechAdaptation. - * @member {boolean} enableSpeechAdaptation - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * CreateVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @instance */ - SpeechToTextSettings.prototype.enableSpeechAdaptation = false; + CreateVersionRequest.prototype.parent = ""; /** - * Creates a new SpeechToTextSettings instance using the specified properties. + * CreateVersionRequest version. + * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.version = null; + + /** + * Creates a new CreateVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings instance + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest instance */ - SpeechToTextSettings.create = function create(properties) { - return new SpeechToTextSettings(properties); + CreateVersionRequest.create = function create(properties) { + return new CreateVersionRequest(properties); }; /** - * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextSettings.encode = function encode(message, writer) { + CreateVersionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableSpeechAdaptation != null && Object.hasOwnProperty.call(message, "enableSpeechAdaptation")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeechAdaptation); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CreateVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextSettings.encodeDelimited = function encodeDelimited(message, writer) { + CreateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer. + * Decodes a CreateVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextSettings.decode = function decode(reader, length) { + CreateVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enableSpeechAdaptation = reader.bool(); + message.parent = reader.string(); + break; + } + case 2: { + message.version = $root.google.cloud.dialogflow.cx.v3.Version.decode(reader, reader.uint32()); break; } default: @@ -81548,139 +83880,137 @@ }; /** - * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextSettings.decodeDelimited = function decodeDelimited(reader) { + CreateVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechToTextSettings message. + * Verifies a CreateVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechToTextSettings.verify = function verify(message) { + CreateVersionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) - if (typeof message.enableSpeechAdaptation !== "boolean") - return "enableSpeechAdaptation: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); + if (error) + return "version." + error; + } return null; }; /** - * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings + * @returns {google.cloud.dialogflow.cx.v3.CreateVersionRequest} CreateVersionRequest */ - SpeechToTextSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings) + CreateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); - if (object.enableSpeechAdaptation != null) - message.enableSpeechAdaptation = Boolean(object.enableSpeechAdaptation); + var message = new $root.google.cloud.dialogflow.cx.v3.CreateVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CreateVersionRequest.version: object expected"); + message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); + } return message; }; /** - * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} message SpeechToTextSettings + * @param {google.cloud.dialogflow.cx.v3.CreateVersionRequest} message CreateVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechToTextSettings.toObject = function toObject(message, options) { + CreateVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.enableSpeechAdaptation = false; - if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) - object.enableSpeechAdaptation = message.enableSpeechAdaptation; + if (options.defaults) { + object.parent = ""; + object.version = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); return object; }; /** - * Converts this SpeechToTextSettings to JSON. + * Converts this CreateVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @instance * @returns {Object.} JSON object */ - SpeechToTextSettings.prototype.toJSON = function toJSON() { + CreateVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpeechToTextSettings + * Gets the default type url for CreateVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3.CreateVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpeechToTextSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CreateVersionRequest"; }; - return SpeechToTextSettings; + return CreateVersionRequest; })(); - v3beta1.Agent = (function() { + v3.UpdateVersionRequest = (function() { /** - * Properties of an Agent. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IAgent - * @property {string|null} [name] Agent name - * @property {string|null} [displayName] Agent displayName - * @property {string|null} [defaultLanguageCode] Agent defaultLanguageCode - * @property {Array.|null} [supportedLanguageCodes] Agent supportedLanguageCodes - * @property {string|null} [timeZone] Agent timeZone - * @property {string|null} [description] Agent description - * @property {string|null} [avatarUri] Agent avatarUri - * @property {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null} [speechToTextSettings] Agent speechToTextSettings - * @property {string|null} [startFlow] Agent startFlow - * @property {string|null} [securitySettings] Agent securitySettings - * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging - * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection - * @property {boolean|null} [locked] Agent locked - * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings - * @property {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null} [gitIntegrationSettings] Agent gitIntegrationSettings - * @property {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null} [textToSpeechSettings] Agent textToSpeechSettings - * @property {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null} [genAppBuilderSettings] Agent genAppBuilderSettings + * Properties of an UpdateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IUpdateVersionRequest + * @property {google.cloud.dialogflow.cx.v3.IVersion|null} [version] UpdateVersionRequest version + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVersionRequest updateMask */ /** - * Constructs a new Agent. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Agent. - * @implements IAgent + * Constructs a new UpdateVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents an UpdateVersionRequest. + * @implements IUpdateVersionRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set */ - function Agent(properties) { - this.supportedLanguageCodes = []; + function UpdateVersionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81688,245 +84018,520 @@ } /** - * Agent name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * UpdateVersionRequest version. + * @member {google.cloud.dialogflow.cx.v3.IVersion|null|undefined} version + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance */ - Agent.prototype.name = ""; + UpdateVersionRequest.prototype.version = null; /** - * Agent displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * UpdateVersionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance */ - Agent.prototype.displayName = ""; + UpdateVersionRequest.prototype.updateMask = null; /** - * Agent defaultLanguageCode. - * @member {string} defaultLanguageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Creates a new UpdateVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest instance */ - Agent.prototype.defaultLanguageCode = ""; + UpdateVersionRequest.create = function create(properties) { + return new UpdateVersionRequest(properties); + }; /** - * Agent supportedLanguageCodes. - * @member {Array.} supportedLanguageCodes - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance - */ - Agent.prototype.supportedLanguageCodes = $util.emptyArray; + * Encodes the specified UpdateVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.google.cloud.dialogflow.cx.v3.Version.encode(message.version, 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; + }; /** - * Agent timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Encodes the specified UpdateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.UpdateVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IUpdateVersionRequest} message UpdateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Agent.prototype.timeZone = ""; + UpdateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Agent description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Decodes an UpdateVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.prototype.description = ""; + UpdateVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = $root.google.cloud.dialogflow.cx.v3.Version.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; + }; /** - * Agent avatarUri. - * @member {string} avatarUri - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Decodes an UpdateVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.prototype.avatarUri = ""; + UpdateVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Agent speechToTextSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null|undefined} speechToTextSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Verifies an UpdateVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Agent.prototype.speechToTextSettings = null; + UpdateVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.google.cloud.dialogflow.cx.v3.Version.verify(message.version); + if (error) + return "version." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Agent startFlow. - * @member {string} startFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Creates an UpdateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} UpdateVersionRequest */ - Agent.prototype.startFlow = ""; + UpdateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.UpdateVersionRequest(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.version: object expected"); + message.version = $root.google.cloud.dialogflow.cx.v3.Version.fromObject(object.version); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.UpdateVersionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Agent securitySettings. - * @member {string} securitySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Creates a plain object from an UpdateVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.UpdateVersionRequest} message UpdateVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Agent.prototype.securitySettings = ""; + UpdateVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = null; + object.updateMask = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.google.cloud.dialogflow.cx.v3.Version.toObject(message.version, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Agent enableStackdriverLogging. - * @member {boolean} enableStackdriverLogging - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * Converts this UpdateVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest * @instance + * @returns {Object.} JSON object */ - Agent.prototype.enableStackdriverLogging = false; + UpdateVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Agent enableSpellCorrection. - * @member {boolean} enableSpellCorrection - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Gets the default type url for UpdateVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.UpdateVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Agent.prototype.enableSpellCorrection = false; + UpdateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.UpdateVersionRequest"; + }; + + return UpdateVersionRequest; + })(); + + v3.DeleteVersionRequest = (function() { /** - * Agent locked. - * @member {boolean} locked - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Properties of a DeleteVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name */ - Agent.prototype.locked = false; /** - * Agent advancedSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Constructs a new DeleteVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set */ - Agent.prototype.advancedSettings = null; + function DeleteVersionRequest(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]]; + } /** - * Agent gitIntegrationSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null|undefined} gitIntegrationSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * DeleteVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @instance */ - Agent.prototype.gitIntegrationSettings = null; + DeleteVersionRequest.prototype.name = ""; /** - * Agent textToSpeechSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null|undefined} textToSpeechSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @instance + * Creates a new DeleteVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest instance */ - Agent.prototype.textToSpeechSettings = null; + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); + }; /** - * Agent genAppBuilderSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null|undefined} genAppBuilderSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.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 DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.DeleteVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVersionRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVersionRequest.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 DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} DeleteVersionRequest + */ + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.DeleteVersionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.DeleteVersionRequest} message DeleteVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVersionRequest.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 DeleteVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest * @instance + * @returns {Object.} JSON object */ - Agent.prototype.genAppBuilderSettings = null; + DeleteVersionRequest.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 DeleteVersionRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.DeleteVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.DeleteVersionRequest"; + }; + + return DeleteVersionRequest; + })(); + + v3.LoadVersionRequest = (function() { /** - * Agent _genAppBuilderSettings. - * @member {"genAppBuilderSettings"|undefined} _genAppBuilderSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * Properties of a LoadVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ILoadVersionRequest + * @property {string|null} [name] LoadVersionRequest name + * @property {boolean|null} [allowOverrideAgentResources] LoadVersionRequest allowOverrideAgentResources + */ + + /** + * Constructs a new LoadVersionRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a LoadVersionRequest. + * @implements ILoadVersionRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set + */ + function LoadVersionRequest(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]]; + } + + /** + * LoadVersionRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @instance */ - Object.defineProperty(Agent.prototype, "_genAppBuilderSettings", { - get: $util.oneOfGetter($oneOfFields = ["genAppBuilderSettings"]), - set: $util.oneOfSetter($oneOfFields) - }); + LoadVersionRequest.prototype.name = ""; /** - * Creates a new Agent instance using the specified properties. + * LoadVersionRequest allowOverrideAgentResources. + * @member {boolean} allowOverrideAgentResources + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest + * @instance + */ + LoadVersionRequest.prototype.allowOverrideAgentResources = false; + + /** + * Creates a new LoadVersionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent instance + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest instance */ - Agent.create = function create(properties) { - return new Agent(properties); + LoadVersionRequest.create = function create(properties) { + return new LoadVersionRequest(properties); }; /** - * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * Encodes the specified LoadVersionRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Agent.encode = function encode(message, writer) { + LoadVersionRequest.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.defaultLanguageCode != null && Object.hasOwnProperty.call(message, "defaultLanguageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultLanguageCode); - if (message.supportedLanguageCodes != null && message.supportedLanguageCodes.length) - for (var i = 0; i < message.supportedLanguageCodes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.supportedLanguageCodes[i]); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.avatarUri != null && Object.hasOwnProperty.call(message, "avatarUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.avatarUri); - if (message.speechToTextSettings != null && Object.hasOwnProperty.call(message, "speechToTextSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.encode(message.speechToTextSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.startFlow != null && Object.hasOwnProperty.call(message, "startFlow")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.startFlow); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.securitySettings); - if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableStackdriverLogging); - if (message.enableSpellCorrection != null && Object.hasOwnProperty.call(message, "enableSpellCorrection")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); - if (message.gitIntegrationSettings != null && Object.hasOwnProperty.call(message, "gitIntegrationSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.encode(message.gitIntegrationSettings, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.genAppBuilderSettings != null && Object.hasOwnProperty.call(message, "genAppBuilderSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.encode(message.genAppBuilderSettings, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); + if (message.allowOverrideAgentResources != null && Object.hasOwnProperty.call(message, "allowOverrideAgentResources")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowOverrideAgentResources); return writer; }; /** - * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. + * Encodes the specified LoadVersionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.LoadVersionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ILoadVersionRequest} message LoadVersionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Agent.encodeDelimited = function encodeDelimited(message, writer) { + LoadVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Agent message from the specified reader or buffer. + * Decodes a LoadVersionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.decode = function decode(reader, length) { + LoadVersionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -81935,69 +84540,7 @@ break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.defaultLanguageCode = reader.string(); - break; - } - case 4: { - if (!(message.supportedLanguageCodes && message.supportedLanguageCodes.length)) - message.supportedLanguageCodes = []; - message.supportedLanguageCodes.push(reader.string()); - break; - } - case 5: { - message.timeZone = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - message.avatarUri = reader.string(); - break; - } - case 13: { - message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.decode(reader, reader.uint32()); - break; - } - case 16: { - message.startFlow = reader.string(); - break; - } - case 17: { - message.securitySettings = reader.string(); - break; - } - case 18: { - message.enableStackdriverLogging = reader.bool(); - break; - } - case 20: { - message.enableSpellCorrection = reader.bool(); - break; - } - case 27: { - message.locked = reader.bool(); - break; - } - case 22: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); - break; - } - case 30: { - message.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.decode(reader, reader.uint32()); - break; - } - case 31: { - message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.decode(reader, reader.uint32()); - break; - } - case 33: { - message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.decode(reader, reader.uint32()); + message.allowOverrideAgentResources = reader.bool(); break; } default: @@ -82009,1144 +84552,237 @@ }; /** - * Decodes an Agent message from the specified reader or buffer, length delimited. + * Decodes a LoadVersionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Agent.decodeDelimited = function decodeDelimited(reader) { + LoadVersionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Agent message. + * Verifies a LoadVersionRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Agent.verify = function verify(message) { + LoadVersionRequest.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.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) - if (!$util.isString(message.defaultLanguageCode)) - return "defaultLanguageCode: string expected"; - if (message.supportedLanguageCodes != null && message.hasOwnProperty("supportedLanguageCodes")) { - if (!Array.isArray(message.supportedLanguageCodes)) - return "supportedLanguageCodes: array expected"; - for (var i = 0; i < message.supportedLanguageCodes.length; ++i) - if (!$util.isString(message.supportedLanguageCodes[i])) - return "supportedLanguageCodes: string[] expected"; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) - if (!$util.isString(message.avatarUri)) - return "avatarUri: string expected"; - if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify(message.speechToTextSettings); - if (error) - return "speechToTextSettings." + error; - } - if (message.startFlow != null && message.hasOwnProperty("startFlow")) - if (!$util.isString(message.startFlow)) - return "startFlow: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - if (!$util.isString(message.securitySettings)) - return "securitySettings: string expected"; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - if (typeof message.enableStackdriverLogging !== "boolean") - return "enableStackdriverLogging: boolean expected"; - if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) - if (typeof message.enableSpellCorrection !== "boolean") - return "enableSpellCorrection: boolean expected"; - if (message.locked != null && message.hasOwnProperty("locked")) - if (typeof message.locked !== "boolean") - return "locked: boolean expected"; - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); - if (error) - return "advancedSettings." + error; - } - if (message.gitIntegrationSettings != null && message.hasOwnProperty("gitIntegrationSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify(message.gitIntegrationSettings); - if (error) - return "gitIntegrationSettings." + error; - } - if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify(message.textToSpeechSettings); - if (error) - return "textToSpeechSettings." + error; - } - if (message.genAppBuilderSettings != null && message.hasOwnProperty("genAppBuilderSettings")) { - properties._genAppBuilderSettings = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify(message.genAppBuilderSettings); - if (error) - return "genAppBuilderSettings." + error; - } - } + if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) + if (typeof message.allowOverrideAgentResources !== "boolean") + return "allowOverrideAgentResources: boolean expected"; return null; }; /** - * Creates an Agent message from a plain object. Also converts values to their respective internal types. + * Creates a LoadVersionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent + * @returns {google.cloud.dialogflow.cx.v3.LoadVersionRequest} LoadVersionRequest */ - Agent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent) + LoadVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); + var message = new $root.google.cloud.dialogflow.cx.v3.LoadVersionRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.defaultLanguageCode != null) - message.defaultLanguageCode = String(object.defaultLanguageCode); - if (object.supportedLanguageCodes) { - if (!Array.isArray(object.supportedLanguageCodes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.supportedLanguageCodes: array expected"); - message.supportedLanguageCodes = []; - for (var i = 0; i < object.supportedLanguageCodes.length; ++i) - message.supportedLanguageCodes[i] = String(object.supportedLanguageCodes[i]); - } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.description != null) - message.description = String(object.description); - if (object.avatarUri != null) - message.avatarUri = String(object.avatarUri); - if (object.speechToTextSettings != null) { - if (typeof object.speechToTextSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.speechToTextSettings: object expected"); - message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.fromObject(object.speechToTextSettings); - } - if (object.startFlow != null) - message.startFlow = String(object.startFlow); - if (object.securitySettings != null) - message.securitySettings = String(object.securitySettings); - if (object.enableStackdriverLogging != null) - message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); - if (object.enableSpellCorrection != null) - message.enableSpellCorrection = Boolean(object.enableSpellCorrection); - if (object.locked != null) - message.locked = Boolean(object.locked); - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); - } - if (object.gitIntegrationSettings != null) { - if (typeof object.gitIntegrationSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.gitIntegrationSettings: object expected"); - message.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.fromObject(object.gitIntegrationSettings); - } - if (object.textToSpeechSettings != null) { - if (typeof object.textToSpeechSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.textToSpeechSettings: object expected"); - message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.fromObject(object.textToSpeechSettings); - } - if (object.genAppBuilderSettings != null) { - if (typeof object.genAppBuilderSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.genAppBuilderSettings: object expected"); - message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.fromObject(object.genAppBuilderSettings); - } + if (object.allowOverrideAgentResources != null) + message.allowOverrideAgentResources = Boolean(object.allowOverrideAgentResources); return message; }; /** - * Creates a plain object from an Agent message. Also converts values to other types if specified. + * Creates a plain object from a LoadVersionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent} message Agent + * @param {google.cloud.dialogflow.cx.v3.LoadVersionRequest} message LoadVersionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Agent.toObject = function toObject(message, options) { + LoadVersionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.supportedLanguageCodes = []; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.defaultLanguageCode = ""; - object.timeZone = ""; - object.description = ""; - object.avatarUri = ""; - object.speechToTextSettings = null; - object.startFlow = ""; - object.securitySettings = ""; - object.enableStackdriverLogging = false; - object.enableSpellCorrection = false; - object.advancedSettings = null; - object.locked = false; - object.gitIntegrationSettings = null; - object.textToSpeechSettings = null; + object.allowOverrideAgentResources = 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.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) - object.defaultLanguageCode = message.defaultLanguageCode; - if (message.supportedLanguageCodes && message.supportedLanguageCodes.length) { - object.supportedLanguageCodes = []; - for (var j = 0; j < message.supportedLanguageCodes.length; ++j) - object.supportedLanguageCodes[j] = message.supportedLanguageCodes[j]; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) - object.avatarUri = message.avatarUri; - if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) - object.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.toObject(message.speechToTextSettings, options); - if (message.startFlow != null && message.hasOwnProperty("startFlow")) - object.startFlow = message.startFlow; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = message.securitySettings; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - object.enableStackdriverLogging = message.enableStackdriverLogging; - if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) - object.enableSpellCorrection = message.enableSpellCorrection; - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); - if (message.locked != null && message.hasOwnProperty("locked")) - object.locked = message.locked; - if (message.gitIntegrationSettings != null && message.hasOwnProperty("gitIntegrationSettings")) - object.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.toObject(message.gitIntegrationSettings, options); - if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) - object.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); - if (message.genAppBuilderSettings != null && message.hasOwnProperty("genAppBuilderSettings")) { - object.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.toObject(message.genAppBuilderSettings, options); - if (options.oneofs) - object._genAppBuilderSettings = "genAppBuilderSettings"; - } + if (message.allowOverrideAgentResources != null && message.hasOwnProperty("allowOverrideAgentResources")) + object.allowOverrideAgentResources = message.allowOverrideAgentResources; return object; }; /** - * Converts this Agent to JSON. + * Converts this LoadVersionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @instance * @returns {Object.} JSON object */ - Agent.prototype.toJSON = function toJSON() { + LoadVersionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Agent + * Gets the default type url for LoadVersionRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @memberof google.cloud.dialogflow.cx.v3.LoadVersionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Agent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LoadVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.LoadVersionRequest"; }; - Agent.GitIntegrationSettings = (function() { + return LoadVersionRequest; + })(); - /** - * Properties of a GitIntegrationSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @interface IGitIntegrationSettings - * @property {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null} [githubSettings] GitIntegrationSettings githubSettings - */ + v3.CompareVersionsRequest = (function() { - /** - * Constructs a new GitIntegrationSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @classdesc Represents a GitIntegrationSettings. - * @implements IGitIntegrationSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings=} [properties] Properties to set - */ - function GitIntegrationSettings(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 CompareVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICompareVersionsRequest + * @property {string|null} [baseVersion] CompareVersionsRequest baseVersion + * @property {string|null} [targetVersion] CompareVersionsRequest targetVersion + * @property {string|null} [languageCode] CompareVersionsRequest languageCode + */ - /** - * GitIntegrationSettings githubSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null|undefined} githubSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @instance - */ - GitIntegrationSettings.prototype.githubSettings = null; + /** + * Constructs a new CompareVersionsRequest. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CompareVersionsRequest. + * @implements ICompareVersionsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest=} [properties] Properties to set + */ + function CompareVersionsRequest(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]]; + } - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CompareVersionsRequest baseVersion. + * @member {string} baseVersion + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @instance + */ + CompareVersionsRequest.prototype.baseVersion = ""; - /** - * GitIntegrationSettings gitSettings. - * @member {"githubSettings"|undefined} gitSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @instance - */ - Object.defineProperty(GitIntegrationSettings.prototype, "gitSettings", { - get: $util.oneOfGetter($oneOfFields = ["githubSettings"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * CompareVersionsRequest targetVersion. + * @member {string} targetVersion + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @instance + */ + CompareVersionsRequest.prototype.targetVersion = ""; - /** - * Creates a new GitIntegrationSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings instance - */ - GitIntegrationSettings.create = function create(properties) { - return new GitIntegrationSettings(properties); - }; + /** + * CompareVersionsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @instance + */ + CompareVersionsRequest.prototype.languageCode = ""; - /** - * Encodes the specified GitIntegrationSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings} message GitIntegrationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitIntegrationSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.githubSettings != null && Object.hasOwnProperty.call(message, "githubSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.encode(message.githubSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new CompareVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest instance + */ + CompareVersionsRequest.create = function create(properties) { + return new CompareVersionsRequest(properties); + }; - /** - * Encodes the specified GitIntegrationSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings} message GitIntegrationSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitIntegrationSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CompareVersionsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} message CompareVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompareVersionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVersion != null && Object.hasOwnProperty.call(message, "baseVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseVersion); + if (message.targetVersion != null && Object.hasOwnProperty.call(message, "targetVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetVersion); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + return writer; + }; - /** - * Decodes a GitIntegrationSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitIntegrationSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GitIntegrationSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitIntegrationSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GitIntegrationSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GitIntegrationSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.githubSettings != null && message.hasOwnProperty("githubSettings")) { - properties.gitSettings = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify(message.githubSettings); - if (error) - return "githubSettings." + error; - } - } - return null; - }; - - /** - * Creates a GitIntegrationSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings - */ - GitIntegrationSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings(); - if (object.githubSettings != null) { - if (typeof object.githubSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.githubSettings: object expected"); - message.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.fromObject(object.githubSettings); - } - return message; - }; - - /** - * Creates a plain object from a GitIntegrationSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} message GitIntegrationSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GitIntegrationSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.githubSettings != null && message.hasOwnProperty("githubSettings")) { - object.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.toObject(message.githubSettings, options); - if (options.oneofs) - object.gitSettings = "githubSettings"; - } - return object; - }; - - /** - * Converts this GitIntegrationSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @instance - * @returns {Object.} JSON object - */ - GitIntegrationSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GitIntegrationSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GitIntegrationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings"; - }; - - GitIntegrationSettings.GithubSettings = (function() { - - /** - * Properties of a GithubSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @interface IGithubSettings - * @property {string|null} [displayName] GithubSettings displayName - * @property {string|null} [repositoryUri] GithubSettings repositoryUri - * @property {string|null} [trackingBranch] GithubSettings trackingBranch - * @property {string|null} [accessToken] GithubSettings accessToken - * @property {Array.|null} [branches] GithubSettings branches - */ - - /** - * Constructs a new GithubSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings - * @classdesc Represents a GithubSettings. - * @implements IGithubSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings=} [properties] Properties to set - */ - function GithubSettings(properties) { - this.branches = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GithubSettings displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - */ - GithubSettings.prototype.displayName = ""; - - /** - * GithubSettings repositoryUri. - * @member {string} repositoryUri - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - */ - GithubSettings.prototype.repositoryUri = ""; - - /** - * GithubSettings trackingBranch. - * @member {string} trackingBranch - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - */ - GithubSettings.prototype.trackingBranch = ""; - - /** - * GithubSettings accessToken. - * @member {string} accessToken - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - */ - GithubSettings.prototype.accessToken = ""; - - /** - * GithubSettings branches. - * @member {Array.} branches - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - */ - GithubSettings.prototype.branches = $util.emptyArray; - - /** - * Creates a new GithubSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings instance - */ - GithubSettings.create = function create(properties) { - return new GithubSettings(properties); - }; - - /** - * Encodes the specified GithubSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings} message GithubSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GithubSettings.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.repositoryUri != null && Object.hasOwnProperty.call(message, "repositoryUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryUri); - if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.trackingBranch); - if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessToken); - if (message.branches != null && message.branches.length) - for (var i = 0; i < message.branches.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.branches[i]); - return writer; - }; - - /** - * Encodes the specified GithubSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings} message GithubSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GithubSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GithubSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GithubSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.repositoryUri = reader.string(); - break; - } - case 3: { - message.trackingBranch = reader.string(); - break; - } - case 4: { - message.accessToken = reader.string(); - break; - } - case 5: { - if (!(message.branches && message.branches.length)) - message.branches = []; - message.branches.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GithubSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GithubSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GithubSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GithubSettings.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.repositoryUri != null && message.hasOwnProperty("repositoryUri")) - if (!$util.isString(message.repositoryUri)) - return "repositoryUri: string expected"; - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - if (!$util.isString(message.trackingBranch)) - return "trackingBranch: string expected"; - if (message.accessToken != null && message.hasOwnProperty("accessToken")) - if (!$util.isString(message.accessToken)) - return "accessToken: string expected"; - if (message.branches != null && message.hasOwnProperty("branches")) { - if (!Array.isArray(message.branches)) - return "branches: array expected"; - for (var i = 0; i < message.branches.length; ++i) - if (!$util.isString(message.branches[i])) - return "branches: string[] expected"; - } - return null; - }; - - /** - * Creates a GithubSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings - */ - GithubSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.repositoryUri != null) - message.repositoryUri = String(object.repositoryUri); - if (object.trackingBranch != null) - message.trackingBranch = String(object.trackingBranch); - if (object.accessToken != null) - message.accessToken = String(object.accessToken); - if (object.branches) { - if (!Array.isArray(object.branches)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.branches: array expected"); - message.branches = []; - for (var i = 0; i < object.branches.length; ++i) - message.branches[i] = String(object.branches[i]); - } - return message; - }; - - /** - * Creates a plain object from a GithubSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} message GithubSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GithubSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.branches = []; - if (options.defaults) { - object.displayName = ""; - object.repositoryUri = ""; - object.trackingBranch = ""; - object.accessToken = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.repositoryUri != null && message.hasOwnProperty("repositoryUri")) - object.repositoryUri = message.repositoryUri; - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - object.trackingBranch = message.trackingBranch; - if (message.accessToken != null && message.hasOwnProperty("accessToken")) - object.accessToken = message.accessToken; - if (message.branches && message.branches.length) { - object.branches = []; - for (var j = 0; j < message.branches.length; ++j) - object.branches[j] = message.branches[j]; - } - return object; - }; - - /** - * Converts this GithubSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @instance - * @returns {Object.} JSON object - */ - GithubSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GithubSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GithubSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings"; - }; - - return GithubSettings; - })(); - - return GitIntegrationSettings; - })(); - - Agent.GenAppBuilderSettings = (function() { - - /** - * Properties of a GenAppBuilderSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @interface IGenAppBuilderSettings - * @property {string|null} [engine] GenAppBuilderSettings engine - */ - - /** - * Constructs a new GenAppBuilderSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent - * @classdesc Represents a GenAppBuilderSettings. - * @implements IGenAppBuilderSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings=} [properties] Properties to set - */ - function GenAppBuilderSettings(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]]; - } - - /** - * GenAppBuilderSettings engine. - * @member {string} engine - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @instance - */ - GenAppBuilderSettings.prototype.engine = ""; - - /** - * Creates a new GenAppBuilderSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings instance - */ - GenAppBuilderSettings.create = function create(properties) { - return new GenAppBuilderSettings(properties); - }; - - /** - * Encodes the specified GenAppBuilderSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings} message GenAppBuilderSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenAppBuilderSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.engine); - return writer; - }; - - /** - * Encodes the specified GenAppBuilderSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings} message GenAppBuilderSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenAppBuilderSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenAppBuilderSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenAppBuilderSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.engine = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenAppBuilderSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenAppBuilderSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenAppBuilderSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenAppBuilderSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - if (!$util.isString(message.engine)) - return "engine: string expected"; - return null; - }; - - /** - * Creates a GenAppBuilderSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings - */ - GenAppBuilderSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(); - if (object.engine != null) - message.engine = String(object.engine); - return message; - }; - - /** - * Creates a plain object from a GenAppBuilderSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} message GenAppBuilderSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenAppBuilderSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.engine = ""; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = message.engine; - return object; - }; - - /** - * Converts this GenAppBuilderSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @instance - * @returns {Object.} JSON object - */ - GenAppBuilderSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenAppBuilderSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenAppBuilderSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings"; - }; - - return GenAppBuilderSettings; - })(); - - return Agent; - })(); - - v3beta1.ListAgentsRequest = (function() { - - /** - * Properties of a ListAgentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListAgentsRequest - * @property {string|null} [parent] ListAgentsRequest parent - * @property {number|null} [pageSize] ListAgentsRequest pageSize - * @property {string|null} [pageToken] ListAgentsRequest pageToken - */ - - /** - * Constructs a new ListAgentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListAgentsRequest. - * @implements IListAgentsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set - */ - function ListAgentsRequest(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]]; - } - - /** - * ListAgentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @instance - */ - ListAgentsRequest.prototype.parent = ""; - - /** - * ListAgentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @instance - */ - ListAgentsRequest.prototype.pageSize = 0; - - /** - * ListAgentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @instance - */ - ListAgentsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAgentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest instance - */ - ListAgentsRequest.create = function create(properties) { - return new ListAgentsRequest(properties); - }; - - /** - * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAgentsRequest.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 ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CompareVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsRequest} message CompareVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompareVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer. + * Decodes a CompareVersionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAgentsRequest.decode = function decode(reader, length) { + CompareVersionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.baseVersion = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.targetVersion = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.languageCode = reader.string(); break; } default: @@ -83158,141 +84794,141 @@ }; /** - * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. + * Decodes a CompareVersionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAgentsRequest.decodeDelimited = function decodeDelimited(reader) { + CompareVersionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAgentsRequest message. + * Verifies a CompareVersionsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAgentsRequest.verify = function verify(message) { + CompareVersionsRequest.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.baseVersion != null && message.hasOwnProperty("baseVersion")) + if (!$util.isString(message.baseVersion)) + return "baseVersion: string expected"; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + if (!$util.isString(message.targetVersion)) + return "targetVersion: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompareVersionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} CompareVersionsRequest */ - ListAgentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest) + CompareVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CompareVersionsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); - 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.CompareVersionsRequest(); + if (object.baseVersion != null) + message.baseVersion = String(object.baseVersion); + if (object.targetVersion != null) + message.targetVersion = String(object.targetVersion); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CompareVersionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} message ListAgentsRequest + * @param {google.cloud.dialogflow.cx.v3.CompareVersionsRequest} message CompareVersionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAgentsRequest.toObject = function toObject(message, options) { + CompareVersionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.baseVersion = ""; + object.targetVersion = ""; + 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.baseVersion != null && message.hasOwnProperty("baseVersion")) + object.baseVersion = message.baseVersion; + if (message.targetVersion != null && message.hasOwnProperty("targetVersion")) + object.targetVersion = message.targetVersion; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ListAgentsRequest to JSON. + * Converts this CompareVersionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @instance * @returns {Object.} JSON object */ - ListAgentsRequest.prototype.toJSON = function toJSON() { + CompareVersionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAgentsRequest + * Gets the default type url for CompareVersionsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompareVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CompareVersionsRequest"; }; - return ListAgentsRequest; + return CompareVersionsRequest; })(); - v3beta1.ListAgentsResponse = (function() { + v3.CompareVersionsResponse = (function() { /** - * Properties of a ListAgentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListAgentsResponse - * @property {Array.|null} [agents] ListAgentsResponse agents - * @property {string|null} [nextPageToken] ListAgentsResponse nextPageToken + * Properties of a CompareVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICompareVersionsResponse + * @property {string|null} [baseVersionContentJson] CompareVersionsResponse baseVersionContentJson + * @property {string|null} [targetVersionContentJson] CompareVersionsResponse targetVersionContentJson + * @property {google.protobuf.ITimestamp|null} [compareTime] CompareVersionsResponse compareTime */ /** - * Constructs a new ListAgentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListAgentsResponse. - * @implements IListAgentsResponse + * Constructs a new CompareVersionsResponse. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CompareVersionsResponse. + * @implements ICompareVersionsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse=} [properties] Properties to set */ - function ListAgentsResponse(properties) { - this.agents = []; + function CompareVersionsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83300,92 +84936,103 @@ } /** - * ListAgentsResponse agents. - * @member {Array.} agents - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * CompareVersionsResponse baseVersionContentJson. + * @member {string} baseVersionContentJson + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @instance */ - ListAgentsResponse.prototype.agents = $util.emptyArray; + CompareVersionsResponse.prototype.baseVersionContentJson = ""; /** - * ListAgentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * CompareVersionsResponse targetVersionContentJson. + * @member {string} targetVersionContentJson + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @instance */ - ListAgentsResponse.prototype.nextPageToken = ""; + CompareVersionsResponse.prototype.targetVersionContentJson = ""; /** - * Creates a new ListAgentsResponse instance using the specified properties. + * CompareVersionsResponse compareTime. + * @member {google.protobuf.ITimestamp|null|undefined} compareTime + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse + * @instance + */ + CompareVersionsResponse.prototype.compareTime = null; + + /** + * Creates a new CompareVersionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse instance + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse instance */ - ListAgentsResponse.create = function create(properties) { - return new ListAgentsResponse(properties); + CompareVersionsResponse.create = function create(properties) { + return new CompareVersionsResponse(properties); }; /** - * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * Encodes the specified CompareVersionsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse} message CompareVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAgentsResponse.encode = function encode(message, writer) { + CompareVersionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agents != null && message.agents.length) - for (var i = 0; i < message.agents.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agents[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.baseVersionContentJson != null && Object.hasOwnProperty.call(message, "baseVersionContentJson")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.baseVersionContentJson); + if (message.targetVersionContentJson != null && Object.hasOwnProperty.call(message, "targetVersionContentJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetVersionContentJson); + if (message.compareTime != null && Object.hasOwnProperty.call(message, "compareTime")) + $root.google.protobuf.Timestamp.encode(message.compareTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. + * Encodes the specified CompareVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CompareVersionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3.ICompareVersionsResponse} message CompareVersionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CompareVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer. + * Decodes a CompareVersionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAgentsResponse.decode = function decode(reader, length) { + CompareVersionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.agents && message.agents.length)) - message.agents = []; - message.agents.push($root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32())); + message.baseVersionContentJson = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.targetVersionContentJson = reader.string(); + break; + } + case 3: { + message.compareTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -83397,148 +85044,158 @@ }; /** - * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. + * Decodes a CompareVersionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAgentsResponse.decodeDelimited = function decodeDelimited(reader) { + CompareVersionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAgentsResponse message. + * Verifies a CompareVersionsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAgentsResponse.verify = function verify(message) { + CompareVersionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.agents != null && message.hasOwnProperty("agents")) { - if (!Array.isArray(message.agents)) - return "agents: array expected"; - for (var i = 0; i < message.agents.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agents[i]); - if (error) - return "agents." + error; - } + if (message.baseVersionContentJson != null && message.hasOwnProperty("baseVersionContentJson")) + if (!$util.isString(message.baseVersionContentJson)) + return "baseVersionContentJson: string expected"; + if (message.targetVersionContentJson != null && message.hasOwnProperty("targetVersionContentJson")) + if (!$util.isString(message.targetVersionContentJson)) + return "targetVersionContentJson: string expected"; + if (message.compareTime != null && message.hasOwnProperty("compareTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.compareTime); + if (error) + return "compareTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CompareVersionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse + * @returns {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} CompareVersionsResponse */ - ListAgentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) + CompareVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); - if (object.agents) { - if (!Array.isArray(object.agents)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: array expected"); - message.agents = []; - for (var i = 0; i < object.agents.length; ++i) { - if (typeof object.agents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: object expected"); - message.agents[i] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agents[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3.CompareVersionsResponse(); + if (object.baseVersionContentJson != null) + message.baseVersionContentJson = String(object.baseVersionContentJson); + if (object.targetVersionContentJson != null) + message.targetVersionContentJson = String(object.targetVersionContentJson); + if (object.compareTime != null) { + if (typeof object.compareTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CompareVersionsResponse.compareTime: object expected"); + message.compareTime = $root.google.protobuf.Timestamp.fromObject(object.compareTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CompareVersionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} message ListAgentsResponse + * @param {google.cloud.dialogflow.cx.v3.CompareVersionsResponse} message CompareVersionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAgentsResponse.toObject = function toObject(message, options) { + CompareVersionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.agents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.agents && message.agents.length) { - object.agents = []; - for (var j = 0; j < message.agents.length; ++j) - object.agents[j] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agents[j], options); + if (options.defaults) { + object.baseVersionContentJson = ""; + object.targetVersionContentJson = ""; + object.compareTime = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; + if (message.baseVersionContentJson != null && message.hasOwnProperty("baseVersionContentJson")) + object.baseVersionContentJson = message.baseVersionContentJson; + if (message.targetVersionContentJson != null && message.hasOwnProperty("targetVersionContentJson")) + object.targetVersionContentJson = message.targetVersionContentJson; + if (message.compareTime != null && message.hasOwnProperty("compareTime")) + object.compareTime = $root.google.protobuf.Timestamp.toObject(message.compareTime, options); + return object; }; /** - * Converts this ListAgentsResponse to JSON. + * Converts this CompareVersionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @instance * @returns {Object.} JSON object */ - ListAgentsResponse.prototype.toJSON = function toJSON() { + CompareVersionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAgentsResponse + * Gets the default type url for CompareVersionsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + * @memberof google.cloud.dialogflow.cx.v3.CompareVersionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompareVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CompareVersionsResponse"; }; - return ListAgentsResponse; + return CompareVersionsResponse; })(); - v3beta1.GetAgentRequest = (function() { + return v3; + })(); + + cx.v3beta1 = (function() { + + /** + * Namespace v3beta1. + * @memberof google.cloud.dialogflow.cx + * @namespace + */ + var v3beta1 = {}; + + v3beta1.AdvancedSettings = (function() { /** - * Properties of a GetAgentRequest. + * Properties of an AdvancedSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetAgentRequest - * @property {string|null} [name] GetAgentRequest name + * @interface IAdvancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null} [audioExportGcsDestination] AdvancedSettings audioExportGcsDestination + * @property {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null} [dtmfSettings] AdvancedSettings dtmfSettings + * @property {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null} [loggingSettings] AdvancedSettings loggingSettings */ /** - * Constructs a new GetAgentRequest. + * Constructs a new AdvancedSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetAgentRequest. - * @implements IGetAgentRequest + * @classdesc Represents an AdvancedSettings. + * @implements IAdvancedSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings=} [properties] Properties to set */ - function GetAgentRequest(properties) { + function AdvancedSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83546,75 +85203,103 @@ } /** - * GetAgentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * AdvancedSettings audioExportGcsDestination. + * @member {google.cloud.dialogflow.cx.v3beta1.IGcsDestination|null|undefined} audioExportGcsDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @instance */ - GetAgentRequest.prototype.name = ""; + AdvancedSettings.prototype.audioExportGcsDestination = null; /** - * Creates a new GetAgentRequest instance using the specified properties. + * AdvancedSettings dtmfSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings|null|undefined} dtmfSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @instance + */ + AdvancedSettings.prototype.dtmfSettings = null; + + /** + * AdvancedSettings loggingSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings|null|undefined} loggingSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @instance + */ + AdvancedSettings.prototype.loggingSettings = null; + + /** + * Creates a new AdvancedSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings instance */ - GetAgentRequest.create = function create(properties) { - return new GetAgentRequest(properties); + AdvancedSettings.create = function create(properties) { + return new AdvancedSettings(properties); }; /** - * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * Encodes the specified AdvancedSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings} message AdvancedSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentRequest.encode = function encode(message, writer) { + AdvancedSettings.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.audioExportGcsDestination != null && Object.hasOwnProperty.call(message, "audioExportGcsDestination")) + $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.encode(message.audioExportGcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dtmfSettings != null && Object.hasOwnProperty.call(message, "dtmfSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.encode(message.dtmfSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.loggingSettings != null && Object.hasOwnProperty.call(message, "loggingSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.encode(message.loggingSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. + * Encodes the specified AdvancedSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings} message AdvancedSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AdvancedSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAgentRequest message from the specified reader or buffer. + * Decodes an AdvancedSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentRequest.decode = function decode(reader, length) { + AdvancedSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 2: { + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.decode(reader, reader.uint32()); + break; + } + case 6: { + message.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.decode(reader, reader.uint32()); break; } default: @@ -83626,123 +85311,631 @@ }; /** - * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. + * Decodes an AdvancedSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentRequest.decodeDelimited = function decodeDelimited(reader) { + AdvancedSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAgentRequest message. + * Verifies an AdvancedSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAgentRequest.verify = function verify(message) { + AdvancedSettings.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.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify(message.audioExportGcsDestination); + if (error) + return "audioExportGcsDestination." + error; + } + if (message.dtmfSettings != null && message.hasOwnProperty("dtmfSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify(message.dtmfSettings); + if (error) + return "dtmfSettings." + error; + } + if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify(message.loggingSettings); + if (error) + return "loggingSettings." + error; + } return null; }; /** - * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdvancedSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} AdvancedSettings */ - GetAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest) + AdvancedSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings(); + if (object.audioExportGcsDestination != null) { + if (typeof object.audioExportGcsDestination !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.audioExportGcsDestination: object expected"); + message.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.fromObject(object.audioExportGcsDestination); + } + if (object.dtmfSettings != null) { + if (typeof object.dtmfSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.dtmfSettings: object expected"); + message.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.fromObject(object.dtmfSettings); + } + if (object.loggingSettings != null) { + if (typeof object.loggingSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.loggingSettings: object expected"); + message.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.fromObject(object.loggingSettings); + } return message; }; /** - * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from an AdvancedSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} message GetAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings} message AdvancedSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAgentRequest.toObject = function toObject(message, options) { + AdvancedSettings.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.audioExportGcsDestination = null; + object.dtmfSettings = null; + object.loggingSettings = null; + } + if (message.audioExportGcsDestination != null && message.hasOwnProperty("audioExportGcsDestination")) + object.audioExportGcsDestination = $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination.toObject(message.audioExportGcsDestination, options); + if (message.dtmfSettings != null && message.hasOwnProperty("dtmfSettings")) + object.dtmfSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.toObject(message.dtmfSettings, options); + if (message.loggingSettings != null && message.hasOwnProperty("loggingSettings")) + object.loggingSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.toObject(message.loggingSettings, options); return object; }; /** - * Converts this GetAgentRequest to JSON. + * Converts this AdvancedSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @instance * @returns {Object.} JSON object */ - GetAgentRequest.prototype.toJSON = function toJSON() { + AdvancedSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAgentRequest + * Gets the default type url for AdvancedSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvancedSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings"; }; - return GetAgentRequest; + AdvancedSettings.DtmfSettings = (function() { + + /** + * Properties of a DtmfSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @interface IDtmfSettings + * @property {boolean|null} [enabled] DtmfSettings enabled + * @property {number|null} [maxDigits] DtmfSettings maxDigits + * @property {string|null} [finishDigit] DtmfSettings finishDigit + */ + + /** + * Constructs a new DtmfSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @classdesc Represents a DtmfSettings. + * @implements IDtmfSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings=} [properties] Properties to set + */ + function DtmfSettings(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]]; + } + + /** + * DtmfSettings enabled. + * @member {boolean} enabled + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @instance + */ + DtmfSettings.prototype.enabled = false; + + /** + * DtmfSettings maxDigits. + * @member {number} maxDigits + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @instance + */ + DtmfSettings.prototype.maxDigits = 0; + + /** + * DtmfSettings finishDigit. + * @member {string} finishDigit + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @instance + */ + DtmfSettings.prototype.finishDigit = ""; + + /** + * Creates a new DtmfSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings instance + */ + DtmfSettings.create = function create(properties) { + return new DtmfSettings(properties); + }; + + /** + * Encodes the specified DtmfSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings} message DtmfSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DtmfSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.maxDigits != null && Object.hasOwnProperty.call(message, "maxDigits")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDigits); + if (message.finishDigit != null && Object.hasOwnProperty.call(message, "finishDigit")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.finishDigit); + return writer; + }; + + /** + * Encodes the specified DtmfSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.IDtmfSettings} message DtmfSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DtmfSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DtmfSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DtmfSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.maxDigits = reader.int32(); + break; + } + case 3: { + message.finishDigit = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DtmfSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DtmfSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DtmfSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DtmfSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.maxDigits != null && message.hasOwnProperty("maxDigits")) + if (!$util.isInteger(message.maxDigits)) + return "maxDigits: integer expected"; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + if (!$util.isString(message.finishDigit)) + return "finishDigit: string expected"; + return null; + }; + + /** + * Creates a DtmfSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} DtmfSettings + */ + DtmfSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.maxDigits != null) + message.maxDigits = object.maxDigits | 0; + if (object.finishDigit != null) + message.finishDigit = String(object.finishDigit); + return message; + }; + + /** + * Creates a plain object from a DtmfSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings} message DtmfSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DtmfSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.maxDigits = 0; + object.finishDigit = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.maxDigits != null && message.hasOwnProperty("maxDigits")) + object.maxDigits = message.maxDigits; + if (message.finishDigit != null && message.hasOwnProperty("finishDigit")) + object.finishDigit = message.finishDigit; + return object; + }; + + /** + * Converts this DtmfSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @instance + * @returns {Object.} JSON object + */ + DtmfSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DtmfSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DtmfSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.DtmfSettings"; + }; + + return DtmfSettings; + })(); + + AdvancedSettings.LoggingSettings = (function() { + + /** + * Properties of a LoggingSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @interface ILoggingSettings + * @property {boolean|null} [enableStackdriverLogging] LoggingSettings enableStackdriverLogging + * @property {boolean|null} [enableInteractionLogging] LoggingSettings enableInteractionLogging + */ + + /** + * Constructs a new LoggingSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + * @classdesc Represents a LoggingSettings. + * @implements ILoggingSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings=} [properties] Properties to set + */ + function LoggingSettings(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]]; + } + + /** + * LoggingSettings enableStackdriverLogging. + * @member {boolean} enableStackdriverLogging + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @instance + */ + LoggingSettings.prototype.enableStackdriverLogging = false; + + /** + * LoggingSettings enableInteractionLogging. + * @member {boolean} enableInteractionLogging + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @instance + */ + LoggingSettings.prototype.enableInteractionLogging = false; + + /** + * Creates a new LoggingSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings instance + */ + LoggingSettings.create = function create(properties) { + return new LoggingSettings(properties); + }; + + /** + * Encodes the specified LoggingSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings} message LoggingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableStackdriverLogging); + if (message.enableInteractionLogging != null && Object.hasOwnProperty.call(message, "enableInteractionLogging")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableInteractionLogging); + return writer; + }; + + /** + * Encodes the specified LoggingSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.ILoggingSettings} message LoggingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoggingSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.enableStackdriverLogging = reader.bool(); + break; + } + case 3: { + message.enableInteractionLogging = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoggingSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoggingSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + if (typeof message.enableStackdriverLogging !== "boolean") + return "enableStackdriverLogging: boolean expected"; + if (message.enableInteractionLogging != null && message.hasOwnProperty("enableInteractionLogging")) + if (typeof message.enableInteractionLogging !== "boolean") + return "enableInteractionLogging: boolean expected"; + return null; + }; + + /** + * Creates a LoggingSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} LoggingSettings + */ + LoggingSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings(); + if (object.enableStackdriverLogging != null) + message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + if (object.enableInteractionLogging != null) + message.enableInteractionLogging = Boolean(object.enableInteractionLogging); + return message; + }; + + /** + * Creates a plain object from a LoggingSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings} message LoggingSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableStackdriverLogging = false; + object.enableInteractionLogging = false; + } + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + object.enableStackdriverLogging = message.enableStackdriverLogging; + if (message.enableInteractionLogging != null && message.hasOwnProperty("enableInteractionLogging")) + object.enableInteractionLogging = message.enableInteractionLogging; + return object; + }; + + /** + * Converts this LoggingSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @instance + * @returns {Object.} JSON object + */ + LoggingSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoggingSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings"; + }; + + return LoggingSettings; + })(); + + return AdvancedSettings; })(); - v3beta1.CreateAgentRequest = (function() { + v3beta1.GcsDestination = (function() { /** - * Properties of a CreateAgentRequest. + * Properties of a GcsDestination. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateAgentRequest - * @property {string|null} [parent] CreateAgentRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] CreateAgentRequest agent + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri */ /** - * Constructs a new CreateAgentRequest. + * Constructs a new GcsDestination. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateAgentRequest. - * @implements ICreateAgentRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set */ - function CreateAgentRequest(properties) { + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83750,89 +85943,75 @@ } /** - * CreateAgentRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest - * @instance - */ - CreateAgentRequest.prototype.parent = ""; - - /** - * CreateAgentRequest agent. - * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @instance */ - CreateAgentRequest.prototype.agent = null; + GcsDestination.prototype.uri = ""; /** - * Creates a new CreateAgentRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination instance */ - CreateAgentRequest.create = function create(properties) { - return new CreateAgentRequest(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAgentRequest.encode = function encode(message, writer) { + GcsDestination.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.agent != null && Object.hasOwnProperty.call(message, "agent")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAgentRequest.decode = function decode(reader, length) { + GcsDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); + message.uri = reader.string(); break; } default: @@ -83844,373 +86023,520 @@ }; /** - * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAgentRequest.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAgentRequest message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAgentRequest.verify = function verify(message) { + GcsDestination.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.agent != null && message.hasOwnProperty("agent")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); - if (error) - return "agent." + error; - } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GcsDestination} GcsDestination */ - CreateAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.agent != null) { - if (typeof object.agent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.agent: object expected"); - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} message CreateAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAgentRequest.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.agent = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this CreateAgentRequest to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @instance * @returns {Object.} JSON object */ - CreateAgentRequest.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAgentRequest + * Gets the default type url for GcsDestination * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GcsDestination * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GcsDestination"; }; - return CreateAgentRequest; + return GcsDestination; })(); - v3beta1.UpdateAgentRequest = (function() { + v3beta1.Agents = (function() { /** - * Properties of an UpdateAgentRequest. + * Constructs a new Agents service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateAgentRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] UpdateAgentRequest agent - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAgentRequest updateMask + * @classdesc Represents an Agents + * @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 Agents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Agents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Agents; /** - * Constructs a new UpdateAgentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateAgentRequest. - * @implements IUpdateAgentRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set + * Creates new Agents service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @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 {Agents} RPC service. Useful where requests and/or responses are streamed. */ - function UpdateAgentRequest(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]]; - } + Agents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateAgentRequest agent. - * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|listAgents}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef ListAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} [response] ListAgentsResponse */ - UpdateAgentRequest.prototype.agent = null; /** - * UpdateAgentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * Calls ListAgents. + * @function listAgents + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ListAgentsCallback} callback Node-style callback called with the error, if any, and ListAgentsResponse + * @returns {undefined} + * @variation 1 */ - UpdateAgentRequest.prototype.updateMask = null; + Object.defineProperty(Agents.prototype.listAgents = function listAgents(request, callback) { + return this.rpcCall(listAgents, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse, request, callback); + }, "name", { value: "ListAgents" }); /** - * Creates a new UpdateAgentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest instance + * Calls ListAgents. + * @function listAgents + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} request ListAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateAgentRequest.create = function create(properties) { - return new UpdateAgentRequest(properties); - }; /** - * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest 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.v3beta1.Agents|getAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef GetAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent */ - UpdateAgentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, 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 UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetAgent. + * @function getAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 */ - UpdateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agents.prototype.getAgent = function getAgent(request, callback) { + return this.rpcCall(getAgent, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "GetAgent" }); /** - * Decodes an UpdateAgentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetAgent. + * @function getAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} request GetAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateAgentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.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 UpdateAgentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest - * @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.v3beta1.Agents|createAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef CreateAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent */ - UpdateAgentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an UpdateAgentRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateAgent. + * @function createAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 */ - UpdateAgentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); - if (error) - return "agent." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + Object.defineProperty(Agents.prototype.createAgent = function createAgent(request, callback) { + return this.rpcCall(createAgent, $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "CreateAgent" }); /** - * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest + * Calls CreateAgent. + * @function createAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} request CreateAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); - if (object.agent != null) { - if (typeof object.agent !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.agent: object expected"); - message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; /** - * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} message UpdateAgentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef UpdateAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} [response] Agent */ - UpdateAgentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.agent = null; - object.updateMask = null; - } - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; /** - * Converts this UpdateAgentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + * Calls UpdateAgent. + * @function updateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgentCallback} callback Node-style callback called with the error, if any, and Agent + * @returns {undefined} + * @variation 1 */ - UpdateAgentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Agents.prototype.updateAgent = function updateAgent(request, callback) { + return this.rpcCall(updateAgent, $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Agent, request, callback); + }, "name", { value: "UpdateAgent" }); /** - * Gets the default type url for UpdateAgentRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls UpdateAgent. + * @function updateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} request UpdateAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest"; - }; - return UpdateAgentRequest; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|deleteAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef DeleteAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAgent. + * @function deleteAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.deleteAgent = function deleteAgent(request, callback) { + return this.rpcCall(deleteAgent, $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAgent" }); + + /** + * Calls DeleteAgent. + * @function deleteAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} request DeleteAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|exportAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef ExportAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportAgent. + * @function exportAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.exportAgent = function exportAgent(request, callback) { + return this.rpcCall(exportAgent, $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportAgent" }); + + /** + * Calls ExportAgent. + * @function exportAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} request ExportAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|restoreAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef RestoreAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreAgent. + * @function restoreAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.restoreAgent = function restoreAgent(request, callback) { + return this.rpcCall(restoreAgent, $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreAgent" }); + + /** + * Calls RestoreAgent. + * @function restoreAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} request RestoreAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|validateAgent}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef ValidateAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} [response] AgentValidationResult + */ + + /** + * Calls ValidateAgent. + * @function validateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} request ValidateAgentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgentCallback} callback Node-style callback called with the error, if any, and AgentValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.validateAgent = function validateAgent(request, callback) { + return this.rpcCall(validateAgent, $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest, $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, request, callback); + }, "name", { value: "ValidateAgent" }); + + /** + * Calls ValidateAgent. + * @function validateAgent + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} request ValidateAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getAgentValidationResult}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef GetAgentValidationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} [response] AgentValidationResult + */ + + /** + * Calls GetAgentValidationResult. + * @function getAgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} request GetAgentValidationResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResultCallback} callback Node-style callback called with the error, if any, and AgentValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.getAgentValidationResult = function getAgentValidationResult(request, callback) { + return this.rpcCall(getAgentValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult, request, callback); + }, "name", { value: "GetAgentValidationResult" }); + + /** + * Calls GetAgentValidationResult. + * @function getAgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} request GetAgentValidationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|getGenerativeSettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef GetGenerativeSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} [response] GenerativeSettings + */ + + /** + * Calls GetGenerativeSettings. + * @function getGenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} request GetGenerativeSettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.GetGenerativeSettingsCallback} callback Node-style callback called with the error, if any, and GenerativeSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.getGenerativeSettings = function getGenerativeSettings(request, callback) { + return this.rpcCall(getGenerativeSettings, $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, request, callback); + }, "name", { value: "GetGenerativeSettings" }); + + /** + * Calls GetGenerativeSettings. + * @function getGenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} request GetGenerativeSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Agents|updateGenerativeSettings}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @typedef UpdateGenerativeSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} [response] GenerativeSettings + */ + + /** + * Calls UpdateGenerativeSettings. + * @function updateGenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} request UpdateGenerativeSettingsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Agents.UpdateGenerativeSettingsCallback} callback Node-style callback called with the error, if any, and GenerativeSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agents.prototype.updateGenerativeSettings = function updateGenerativeSettings(request, callback) { + return this.rpcCall(updateGenerativeSettings, $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest, $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings, request, callback); + }, "name", { value: "UpdateGenerativeSettings" }); + + /** + * Calls UpdateGenerativeSettings. + * @function updateGenerativeSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agents + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} request UpdateGenerativeSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Agents; })(); - v3beta1.DeleteAgentRequest = (function() { + v3beta1.SpeechToTextSettings = (function() { /** - * Properties of a DeleteAgentRequest. + * Properties of a SpeechToTextSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteAgentRequest - * @property {string|null} [name] DeleteAgentRequest name + * @interface ISpeechToTextSettings + * @property {boolean|null} [enableSpeechAdaptation] SpeechToTextSettings enableSpeechAdaptation */ /** - * Constructs a new DeleteAgentRequest. + * Constructs a new SpeechToTextSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteAgentRequest. - * @implements IDeleteAgentRequest + * @classdesc Represents a SpeechToTextSettings. + * @implements ISpeechToTextSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set */ - function DeleteAgentRequest(properties) { + function SpeechToTextSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84218,75 +86544,75 @@ } /** - * DeleteAgentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * SpeechToTextSettings enableSpeechAdaptation. + * @member {boolean} enableSpeechAdaptation + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @instance */ - DeleteAgentRequest.prototype.name = ""; + SpeechToTextSettings.prototype.enableSpeechAdaptation = false; /** - * Creates a new DeleteAgentRequest instance using the specified properties. + * Creates a new SpeechToTextSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings instance */ - DeleteAgentRequest.create = function create(properties) { - return new DeleteAgentRequest(properties); + SpeechToTextSettings.create = function create(properties) { + return new SpeechToTextSettings(properties); }; /** - * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * Encodes the specified SpeechToTextSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAgentRequest.encode = function encode(message, writer) { + SpeechToTextSettings.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.enableSpeechAdaptation != null && Object.hasOwnProperty.call(message, "enableSpeechAdaptation")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeechAdaptation); return writer; }; /** - * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. + * Encodes the specified SpeechToTextSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings} message SpeechToTextSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + SpeechToTextSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer. + * Decodes a SpeechToTextSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAgentRequest.decode = function decode(reader, length) { + SpeechToTextSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.enableSpeechAdaptation = reader.bool(); break; } default: @@ -84298,127 +86624,140 @@ }; /** - * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAgentRequest.decodeDelimited = function decodeDelimited(reader) { + SpeechToTextSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAgentRequest message. + * Verifies a SpeechToTextSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAgentRequest.verify = function verify(message) { + SpeechToTextSettings.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.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) + if (typeof message.enableSpeechAdaptation !== "boolean") + return "enableSpeechAdaptation: boolean expected"; return null; }; /** - * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} SpeechToTextSettings */ - DeleteAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest) + SpeechToTextSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings(); + if (object.enableSpeechAdaptation != null) + message.enableSpeechAdaptation = Boolean(object.enableSpeechAdaptation); return message; }; /** - * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a SpeechToTextSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} message DeleteAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings} message SpeechToTextSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAgentRequest.toObject = function toObject(message, options) { + SpeechToTextSettings.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.enableSpeechAdaptation = false; + if (message.enableSpeechAdaptation != null && message.hasOwnProperty("enableSpeechAdaptation")) + object.enableSpeechAdaptation = message.enableSpeechAdaptation; return object; }; /** - * Converts this DeleteAgentRequest to JSON. + * Converts this SpeechToTextSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @instance * @returns {Object.} JSON object */ - DeleteAgentRequest.prototype.toJSON = function toJSON() { + SpeechToTextSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteAgentRequest + * Gets the default type url for SpeechToTextSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpeechToTextSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings"; }; - return DeleteAgentRequest; + return SpeechToTextSettings; })(); - v3beta1.ExportAgentRequest = (function() { + v3beta1.Agent = (function() { /** - * Properties of an ExportAgentRequest. + * Properties of an Agent. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportAgentRequest - * @property {string|null} [name] ExportAgentRequest name - * @property {string|null} [agentUri] ExportAgentRequest agentUri - * @property {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null} [dataFormat] ExportAgentRequest dataFormat - * @property {string|null} [environment] ExportAgentRequest environment - * @property {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null} [gitDestination] ExportAgentRequest gitDestination - * @property {boolean|null} [includeBigqueryExportSettings] ExportAgentRequest includeBigqueryExportSettings + * @interface IAgent + * @property {string|null} [name] Agent name + * @property {string|null} [displayName] Agent displayName + * @property {string|null} [defaultLanguageCode] Agent defaultLanguageCode + * @property {Array.|null} [supportedLanguageCodes] Agent supportedLanguageCodes + * @property {string|null} [timeZone] Agent timeZone + * @property {string|null} [description] Agent description + * @property {string|null} [avatarUri] Agent avatarUri + * @property {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null} [speechToTextSettings] Agent speechToTextSettings + * @property {string|null} [startFlow] Agent startFlow + * @property {string|null} [securitySettings] Agent securitySettings + * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging + * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection + * @property {boolean|null} [locked] Agent locked + * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null} [gitIntegrationSettings] Agent gitIntegrationSettings + * @property {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null} [textToSpeechSettings] Agent textToSpeechSettings + * @property {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null} [genAppBuilderSettings] Agent genAppBuilderSettings + * @property {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings|null} [answerFeedbackSettings] Agent answerFeedbackSettings */ /** - * Constructs a new ExportAgentRequest. + * Constructs a new Agent. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportAgentRequest. - * @implements IExportAgentRequest + * @classdesc Represents an Agent. + * @implements IAgent * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set */ - function ExportAgentRequest(properties) { + function Agent(properties) { + this.supportedLanguageCodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84426,120 +86765,255 @@ } /** - * ExportAgentRequest name. + * Agent name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.name = ""; + Agent.prototype.name = ""; /** - * ExportAgentRequest agentUri. - * @member {string} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * Agent displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.agentUri = ""; + Agent.prototype.displayName = ""; /** - * ExportAgentRequest dataFormat. - * @member {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat} dataFormat - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * Agent defaultLanguageCode. + * @member {string} defaultLanguageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.dataFormat = 0; + Agent.prototype.defaultLanguageCode = ""; /** - * ExportAgentRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * Agent supportedLanguageCodes. + * @member {Array.} supportedLanguageCodes + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.environment = ""; + Agent.prototype.supportedLanguageCodes = $util.emptyArray; /** - * ExportAgentRequest gitDestination. - * @member {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null|undefined} gitDestination - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * Agent timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.gitDestination = null; + Agent.prototype.timeZone = ""; /** - * ExportAgentRequest includeBigqueryExportSettings. - * @member {boolean} includeBigqueryExportSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * Agent description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance */ - ExportAgentRequest.prototype.includeBigqueryExportSettings = false; + Agent.prototype.description = ""; /** - * Creates a new ExportAgentRequest instance using the specified properties. + * Agent avatarUri. + * @member {string} avatarUri + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.avatarUri = ""; + + /** + * Agent speechToTextSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ISpeechToTextSettings|null|undefined} speechToTextSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.speechToTextSettings = null; + + /** + * Agent startFlow. + * @member {string} startFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.startFlow = ""; + + /** + * Agent securitySettings. + * @member {string} securitySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.securitySettings = ""; + + /** + * Agent enableStackdriverLogging. + * @member {boolean} enableStackdriverLogging + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.enableStackdriverLogging = false; + + /** + * Agent enableSpellCorrection. + * @member {boolean} enableSpellCorrection + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.enableSpellCorrection = false; + + /** + * Agent locked. + * @member {boolean} locked + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.locked = false; + + /** + * Agent advancedSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.advancedSettings = null; + + /** + * Agent gitIntegrationSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings|null|undefined} gitIntegrationSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.gitIntegrationSettings = null; + + /** + * Agent textToSpeechSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings|null|undefined} textToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.textToSpeechSettings = null; + + /** + * Agent genAppBuilderSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings|null|undefined} genAppBuilderSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.genAppBuilderSettings = null; + + /** + * Agent answerFeedbackSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings|null|undefined} answerFeedbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.answerFeedbackSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Agent _genAppBuilderSettings. + * @member {"genAppBuilderSettings"|undefined} _genAppBuilderSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Object.defineProperty(Agent.prototype, "_genAppBuilderSettings", { + get: $util.oneOfGetter($oneOfFields = ["genAppBuilderSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Agent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent instance */ - ExportAgentRequest.create = function create(properties) { - return new ExportAgentRequest(properties); + Agent.create = function create(properties) { + return new Agent(properties); }; /** - * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * Encodes the specified Agent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentRequest.encode = function encode(message, writer) { + Agent.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.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); - if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.environment); - if (message.gitDestination != null && Object.hasOwnProperty.call(message, "gitDestination")) - $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.encode(message.gitDestination, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.includeBigqueryExportSettings != null && Object.hasOwnProperty.call(message, "includeBigqueryExportSettings")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeBigqueryExportSettings); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.defaultLanguageCode != null && Object.hasOwnProperty.call(message, "defaultLanguageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultLanguageCode); + if (message.supportedLanguageCodes != null && message.supportedLanguageCodes.length) + for (var i = 0; i < message.supportedLanguageCodes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.supportedLanguageCodes[i]); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.avatarUri != null && Object.hasOwnProperty.call(message, "avatarUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.avatarUri); + if (message.speechToTextSettings != null && Object.hasOwnProperty.call(message, "speechToTextSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.encode(message.speechToTextSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.startFlow != null && Object.hasOwnProperty.call(message, "startFlow")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.startFlow); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.securitySettings); + if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableStackdriverLogging); + if (message.enableSpellCorrection != null && Object.hasOwnProperty.call(message, "enableSpellCorrection")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); + if (message.gitIntegrationSettings != null && Object.hasOwnProperty.call(message, "gitIntegrationSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.encode(message.gitIntegrationSettings, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.genAppBuilderSettings != null && Object.hasOwnProperty.call(message, "genAppBuilderSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Agent.AnswerFeedbackSettings.encode(message.answerFeedbackSettings, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. + * Encodes the specified Agent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgent} message Agent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + Agent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer. + * Decodes an Agent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentRequest.decode = function decode(reader, length) { + Agent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -84548,23 +87022,73 @@ break; } case 2: { - message.agentUri = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.dataFormat = reader.int32(); + message.defaultLanguageCode = reader.string(); + break; + } + case 4: { + if (!(message.supportedLanguageCodes && message.supportedLanguageCodes.length)) + message.supportedLanguageCodes = []; + message.supportedLanguageCodes.push(reader.string()); break; } case 5: { - message.environment = reader.string(); + message.timeZone = reader.string(); break; } case 6: { - message.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.decode(reader, reader.uint32()); + message.description = reader.string(); break; } case 7: { - message.includeBigqueryExportSettings = reader.bool(); + message.avatarUri = reader.string(); + break; + } + case 13: { + message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.decode(reader, reader.uint32()); + break; + } + case 16: { + message.startFlow = reader.string(); + break; + } + case 17: { + message.securitySettings = reader.string(); + break; + } + case 18: { + message.enableStackdriverLogging = reader.bool(); + break; + } + case 20: { + message.enableSpellCorrection = reader.bool(); + break; + } + case 27: { + message.locked = reader.bool(); + break; + } + case 22: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + break; + } + case 30: { + message.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.decode(reader, reader.uint32()); + break; + } + case 31: { + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.decode(reader, reader.uint32()); + break; + } + case 33: { + message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.decode(reader, reader.uint32()); + break; + } + case 38: { + message.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.decode(reader, reader.uint32()); break; } default: @@ -84576,206 +87100,305 @@ }; /** - * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. + * Decodes an Agent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentRequest.decodeDelimited = function decodeDelimited(reader) { + Agent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAgentRequest message. + * Verifies an Agent message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAgentRequest.verify = function verify(message) { + Agent.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.agentUri != null && message.hasOwnProperty("agentUri")) - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - switch (message.dataFormat) { - default: - return "dataFormat: enum value expected"; - case 0: - case 1: - case 4: - break; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) + if (!$util.isString(message.defaultLanguageCode)) + return "defaultLanguageCode: string expected"; + if (message.supportedLanguageCodes != null && message.hasOwnProperty("supportedLanguageCodes")) { + if (!Array.isArray(message.supportedLanguageCodes)) + return "supportedLanguageCodes: array expected"; + for (var i = 0; i < message.supportedLanguageCodes.length; ++i) + if (!$util.isString(message.supportedLanguageCodes[i])) + return "supportedLanguageCodes: string[] expected"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) + if (!$util.isString(message.avatarUri)) + return "avatarUri: string expected"; + if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.verify(message.speechToTextSettings); + if (error) + return "speechToTextSettings." + error; + } + if (message.startFlow != null && message.hasOwnProperty("startFlow")) + if (!$util.isString(message.startFlow)) + return "startFlow: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + if (!$util.isString(message.securitySettings)) + return "securitySettings: string expected"; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + if (typeof message.enableStackdriverLogging !== "boolean") + return "enableStackdriverLogging: boolean expected"; + if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) + if (typeof message.enableSpellCorrection !== "boolean") + return "enableSpellCorrection: boolean expected"; + if (message.locked != null && message.hasOwnProperty("locked")) + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); + if (error) + return "advancedSettings." + error; + } + if (message.gitIntegrationSettings != null && message.hasOwnProperty("gitIntegrationSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify(message.gitIntegrationSettings); + if (error) + return "gitIntegrationSettings." + error; + } + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify(message.textToSpeechSettings); + if (error) + return "textToSpeechSettings." + error; + } + if (message.genAppBuilderSettings != null && message.hasOwnProperty("genAppBuilderSettings")) { + properties._genAppBuilderSettings = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify(message.genAppBuilderSettings); + if (error) + return "genAppBuilderSettings." + error; } - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.gitDestination != null && message.hasOwnProperty("gitDestination")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify(message.gitDestination); + } + if (message.answerFeedbackSettings != null && message.hasOwnProperty("answerFeedbackSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.verify(message.answerFeedbackSettings); if (error) - return "gitDestination." + error; + return "answerFeedbackSettings." + error; } - if (message.includeBigqueryExportSettings != null && message.hasOwnProperty("includeBigqueryExportSettings")) - if (typeof message.includeBigqueryExportSettings !== "boolean") - return "includeBigqueryExportSettings: boolean expected"; return null; }; /** - * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Agent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent} Agent */ - ExportAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest) + Agent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent(); if (object.name != null) message.name = String(object.name); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); - 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 4: - message.dataFormat = 4; - break; + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.defaultLanguageCode != null) + message.defaultLanguageCode = String(object.defaultLanguageCode); + if (object.supportedLanguageCodes) { + if (!Array.isArray(object.supportedLanguageCodes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.supportedLanguageCodes: array expected"); + message.supportedLanguageCodes = []; + for (var i = 0; i < object.supportedLanguageCodes.length; ++i) + message.supportedLanguageCodes[i] = String(object.supportedLanguageCodes[i]); } - if (object.environment != null) - message.environment = String(object.environment); - if (object.gitDestination != null) { - if (typeof object.gitDestination !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.gitDestination: object expected"); - message.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.fromObject(object.gitDestination); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.description != null) + message.description = String(object.description); + if (object.avatarUri != null) + message.avatarUri = String(object.avatarUri); + if (object.speechToTextSettings != null) { + if (typeof object.speechToTextSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.speechToTextSettings: object expected"); + message.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.fromObject(object.speechToTextSettings); + } + if (object.startFlow != null) + message.startFlow = String(object.startFlow); + if (object.securitySettings != null) + message.securitySettings = String(object.securitySettings); + if (object.enableStackdriverLogging != null) + message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + if (object.enableSpellCorrection != null) + message.enableSpellCorrection = Boolean(object.enableSpellCorrection); + if (object.locked != null) + message.locked = Boolean(object.locked); + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + } + if (object.gitIntegrationSettings != null) { + if (typeof object.gitIntegrationSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.gitIntegrationSettings: object expected"); + message.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.fromObject(object.gitIntegrationSettings); + } + if (object.textToSpeechSettings != null) { + if (typeof object.textToSpeechSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.textToSpeechSettings: object expected"); + message.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.fromObject(object.textToSpeechSettings); + } + if (object.genAppBuilderSettings != null) { + if (typeof object.genAppBuilderSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.genAppBuilderSettings: object expected"); + message.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.fromObject(object.genAppBuilderSettings); + } + if (object.answerFeedbackSettings != null) { + if (typeof object.answerFeedbackSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.answerFeedbackSettings: object expected"); + message.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.fromObject(object.answerFeedbackSettings); } - if (object.includeBigqueryExportSettings != null) - message.includeBigqueryExportSettings = Boolean(object.includeBigqueryExportSettings); return message; }; /** - * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from an Agent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} message ExportAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Agent} message Agent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAgentRequest.toObject = function toObject(message, options) { + Agent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.supportedLanguageCodes = []; if (options.defaults) { object.name = ""; - object.agentUri = ""; - object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; - object.environment = ""; - object.gitDestination = null; - object.includeBigqueryExportSettings = false; + object.displayName = ""; + object.defaultLanguageCode = ""; + object.timeZone = ""; + object.description = ""; + object.avatarUri = ""; + object.speechToTextSettings = null; + object.startFlow = ""; + object.securitySettings = ""; + object.enableStackdriverLogging = false; + object.enableSpellCorrection = false; + object.advancedSettings = null; + object.locked = false; + object.gitIntegrationSettings = null; + object.textToSpeechSettings = null; + object.answerFeedbackSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) - object.agentUri = message.agentUri; - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.gitDestination != null && message.hasOwnProperty("gitDestination")) - object.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.toObject(message.gitDestination, options); - if (message.includeBigqueryExportSettings != null && message.hasOwnProperty("includeBigqueryExportSettings")) - object.includeBigqueryExportSettings = message.includeBigqueryExportSettings; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.defaultLanguageCode != null && message.hasOwnProperty("defaultLanguageCode")) + object.defaultLanguageCode = message.defaultLanguageCode; + if (message.supportedLanguageCodes && message.supportedLanguageCodes.length) { + object.supportedLanguageCodes = []; + for (var j = 0; j < message.supportedLanguageCodes.length; ++j) + object.supportedLanguageCodes[j] = message.supportedLanguageCodes[j]; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.avatarUri != null && message.hasOwnProperty("avatarUri")) + object.avatarUri = message.avatarUri; + if (message.speechToTextSettings != null && message.hasOwnProperty("speechToTextSettings")) + object.speechToTextSettings = $root.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings.toObject(message.speechToTextSettings, options); + if (message.startFlow != null && message.hasOwnProperty("startFlow")) + object.startFlow = message.startFlow; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = message.securitySettings; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + object.enableStackdriverLogging = message.enableStackdriverLogging; + if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) + object.enableSpellCorrection = message.enableSpellCorrection; + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; + if (message.gitIntegrationSettings != null && message.hasOwnProperty("gitIntegrationSettings")) + object.gitIntegrationSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.toObject(message.gitIntegrationSettings, options); + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) + object.textToSpeechSettings = $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); + if (message.genAppBuilderSettings != null && message.hasOwnProperty("genAppBuilderSettings")) { + object.genAppBuilderSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.toObject(message.genAppBuilderSettings, options); + if (options.oneofs) + object._genAppBuilderSettings = "genAppBuilderSettings"; + } + if (message.answerFeedbackSettings != null && message.hasOwnProperty("answerFeedbackSettings")) + object.answerFeedbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.toObject(message.answerFeedbackSettings, options); return object; }; /** - * Converts this ExportAgentRequest to JSON. + * Converts this Agent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @instance * @returns {Object.} JSON object */ - ExportAgentRequest.prototype.toJSON = function toJSON() { + Agent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportAgentRequest + * Gets the default type url for Agent * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Agent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent"; }; - /** - * DataFormat enum. - * @name google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat - * @enum {number} - * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value - * @property {number} BLOB=1 BLOB value - * @property {number} JSON_PACKAGE=4 JSON_PACKAGE value - */ - ExportAgentRequest.DataFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "BLOB"] = 1; - values[valuesById[4] = "JSON_PACKAGE"] = 4; - return values; - })(); - - ExportAgentRequest.GitDestination = (function() { + Agent.GitIntegrationSettings = (function() { /** - * Properties of a GitDestination. - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest - * @interface IGitDestination - * @property {string|null} [trackingBranch] GitDestination trackingBranch - * @property {string|null} [commitMessage] GitDestination commitMessage + * Properties of a GitIntegrationSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @interface IGitIntegrationSettings + * @property {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null} [githubSettings] GitIntegrationSettings githubSettings */ /** - * Constructs a new GitDestination. - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest - * @classdesc Represents a GitDestination. - * @implements IGitDestination + * Constructs a new GitIntegrationSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @classdesc Represents a GitIntegrationSettings. + * @implements IGitIntegrationSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings=} [properties] Properties to set */ - function GitDestination(properties) { + function GitIntegrationSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84783,89 +87406,615 @@ } /** - * GitDestination trackingBranch. - * @member {string} trackingBranch - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * GitIntegrationSettings githubSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings|null|undefined} githubSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @instance */ - GitDestination.prototype.trackingBranch = ""; + GitIntegrationSettings.prototype.githubSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * GitDestination commitMessage. - * @member {string} commitMessage - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * GitIntegrationSettings gitSettings. + * @member {"githubSettings"|undefined} gitSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @instance */ - GitDestination.prototype.commitMessage = ""; + Object.defineProperty(GitIntegrationSettings.prototype, "gitSettings", { + get: $util.oneOfGetter($oneOfFields = ["githubSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GitDestination instance using the specified properties. + * Creates a new GitIntegrationSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination instance + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings instance */ - GitDestination.create = function create(properties) { - return new GitDestination(properties); + GitIntegrationSettings.create = function create(properties) { + return new GitIntegrationSettings(properties); }; /** - * Encodes the specified GitDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * Encodes the specified GitIntegrationSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination} message GitDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings} message GitIntegrationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GitDestination.encode = function encode(message, writer) { + GitIntegrationSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingBranch); - if (message.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + if (message.githubSettings != null && Object.hasOwnProperty.call(message, "githubSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.encode(message.githubSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GitDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * Encodes the specified GitIntegrationSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination} message GitDestination message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGitIntegrationSettings} message GitIntegrationSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GitDestination.encodeDelimited = function encodeDelimited(message, writer) { + GitIntegrationSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GitDestination message from the specified reader or buffer. + * Decodes a GitIntegrationSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GitDestination.decode = function decode(reader, length) { + GitIntegrationSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.trackingBranch = reader.string(); + message.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.decode(reader, reader.uint32()); break; } - case 2: { - message.commitMessage = reader.string(); + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitIntegrationSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitIntegrationSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitIntegrationSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitIntegrationSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.githubSettings != null && message.hasOwnProperty("githubSettings")) { + properties.gitSettings = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify(message.githubSettings); + if (error) + return "githubSettings." + error; + } + } + return null; + }; + + /** + * Creates a GitIntegrationSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} GitIntegrationSettings + */ + GitIntegrationSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings(); + if (object.githubSettings != null) { + if (typeof object.githubSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.githubSettings: object expected"); + message.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.fromObject(object.githubSettings); + } + return message; + }; + + /** + * Creates a plain object from a GitIntegrationSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings} message GitIntegrationSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitIntegrationSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.githubSettings != null && message.hasOwnProperty("githubSettings")) { + object.githubSettings = $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.toObject(message.githubSettings, options); + if (options.oneofs) + object.gitSettings = "githubSettings"; + } + return object; + }; + + /** + * Converts this GitIntegrationSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @instance + * @returns {Object.} JSON object + */ + GitIntegrationSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitIntegrationSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitIntegrationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings"; + }; + + GitIntegrationSettings.GithubSettings = (function() { + + /** + * Properties of a GithubSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @interface IGithubSettings + * @property {string|null} [displayName] GithubSettings displayName + * @property {string|null} [repositoryUri] GithubSettings repositoryUri + * @property {string|null} [trackingBranch] GithubSettings trackingBranch + * @property {string|null} [accessToken] GithubSettings accessToken + * @property {Array.|null} [branches] GithubSettings branches + */ + + /** + * Constructs a new GithubSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings + * @classdesc Represents a GithubSettings. + * @implements IGithubSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings=} [properties] Properties to set + */ + function GithubSettings(properties) { + this.branches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GithubSettings displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + */ + GithubSettings.prototype.displayName = ""; + + /** + * GithubSettings repositoryUri. + * @member {string} repositoryUri + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + */ + GithubSettings.prototype.repositoryUri = ""; + + /** + * GithubSettings trackingBranch. + * @member {string} trackingBranch + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + */ + GithubSettings.prototype.trackingBranch = ""; + + /** + * GithubSettings accessToken. + * @member {string} accessToken + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + */ + GithubSettings.prototype.accessToken = ""; + + /** + * GithubSettings branches. + * @member {Array.} branches + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + */ + GithubSettings.prototype.branches = $util.emptyArray; + + /** + * Creates a new GithubSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings instance + */ + GithubSettings.create = function create(properties) { + return new GithubSettings(properties); + }; + + /** + * Encodes the specified GithubSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings} message GithubSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GithubSettings.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.repositoryUri != null && Object.hasOwnProperty.call(message, "repositoryUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repositoryUri); + if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.trackingBranch); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessToken); + if (message.branches != null && message.branches.length) + for (var i = 0; i < message.branches.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.branches[i]); + return writer; + }; + + /** + * Encodes the specified GithubSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.IGithubSettings} message GithubSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GithubSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GithubSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GithubSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.repositoryUri = reader.string(); + break; + } + case 3: { + message.trackingBranch = reader.string(); + break; + } + case 4: { + message.accessToken = reader.string(); + break; + } + case 5: { + if (!(message.branches && message.branches.length)) + message.branches = []; + message.branches.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GithubSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GithubSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GithubSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GithubSettings.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.repositoryUri != null && message.hasOwnProperty("repositoryUri")) + if (!$util.isString(message.repositoryUri)) + return "repositoryUri: string expected"; + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + if (!$util.isString(message.trackingBranch)) + return "trackingBranch: string expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + if (message.branches != null && message.hasOwnProperty("branches")) { + if (!Array.isArray(message.branches)) + return "branches: array expected"; + for (var i = 0; i < message.branches.length; ++i) + if (!$util.isString(message.branches[i])) + return "branches: string[] expected"; + } + return null; + }; + + /** + * Creates a GithubSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} GithubSettings + */ + GithubSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.repositoryUri != null) + message.repositoryUri = String(object.repositoryUri); + if (object.trackingBranch != null) + message.trackingBranch = String(object.trackingBranch); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + if (object.branches) { + if (!Array.isArray(object.branches)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings.branches: array expected"); + message.branches = []; + for (var i = 0; i < object.branches.length; ++i) + message.branches[i] = String(object.branches[i]); + } + return message; + }; + + /** + * Creates a plain object from a GithubSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings} message GithubSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GithubSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.branches = []; + if (options.defaults) { + object.displayName = ""; + object.repositoryUri = ""; + object.trackingBranch = ""; + object.accessToken = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.repositoryUri != null && message.hasOwnProperty("repositoryUri")) + object.repositoryUri = message.repositoryUri; + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + object.trackingBranch = message.trackingBranch; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + if (message.branches && message.branches.length) { + object.branches = []; + for (var j = 0; j < message.branches.length; ++j) + object.branches[j] = message.branches[j]; + } + return object; + }; + + /** + * Converts this GithubSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @instance + * @returns {Object.} JSON object + */ + GithubSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GithubSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GithubSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.GithubSettings"; + }; + + return GithubSettings; + })(); + + return GitIntegrationSettings; + })(); + + Agent.GenAppBuilderSettings = (function() { + + /** + * Properties of a GenAppBuilderSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @interface IGenAppBuilderSettings + * @property {string|null} [engine] GenAppBuilderSettings engine + */ + + /** + * Constructs a new GenAppBuilderSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @classdesc Represents a GenAppBuilderSettings. + * @implements IGenAppBuilderSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings=} [properties] Properties to set + */ + function GenAppBuilderSettings(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]]; + } + + /** + * GenAppBuilderSettings engine. + * @member {string} engine + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @instance + */ + GenAppBuilderSettings.prototype.engine = ""; + + /** + * Creates a new GenAppBuilderSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings instance + */ + GenAppBuilderSettings.create = function create(properties) { + return new GenAppBuilderSettings(properties); + }; + + /** + * Encodes the specified GenAppBuilderSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings} message GenAppBuilderSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenAppBuilderSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.engine); + return writer; + }; + + /** + * Encodes the specified GenAppBuilderSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IGenAppBuilderSettings} message GenAppBuilderSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenAppBuilderSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenAppBuilderSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenAppBuilderSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.engine = reader.string(); break; } default: @@ -84877,136 +88026,330 @@ }; /** - * Decodes a GitDestination message from the specified reader or buffer, length delimited. + * Decodes a GenAppBuilderSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GitDestination.decodeDelimited = function decodeDelimited(reader) { + GenAppBuilderSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GitDestination message. + * Verifies a GenAppBuilderSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GitDestination.verify = function verify(message) { + GenAppBuilderSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - if (!$util.isString(message.trackingBranch)) - return "trackingBranch: string expected"; - if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) - if (!$util.isString(message.commitMessage)) - return "commitMessage: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + if (!$util.isString(message.engine)) + return "engine: string expected"; return null; }; /** - * Creates a GitDestination message from a plain object. Also converts values to their respective internal types. + * Creates a GenAppBuilderSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} GenAppBuilderSettings */ - GitDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination) + GenAppBuilderSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination(); - if (object.trackingBranch != null) - message.trackingBranch = String(object.trackingBranch); - if (object.commitMessage != null) - message.commitMessage = String(object.commitMessage); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings(); + if (object.engine != null) + message.engine = String(object.engine); return message; }; /** - * Creates a plain object from a GitDestination message. Also converts values to other types if specified. + * Creates a plain object from a GenAppBuilderSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} message GitDestination + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings} message GenAppBuilderSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GitDestination.toObject = function toObject(message, options) { + GenAppBuilderSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.trackingBranch = ""; - object.commitMessage = ""; + if (options.defaults) + object.engine = ""; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = message.engine; + return object; + }; + + /** + * Converts this GenAppBuilderSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @instance + * @returns {Object.} JSON object + */ + GenAppBuilderSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenAppBuilderSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenAppBuilderSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - object.trackingBranch = message.trackingBranch; - if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) - object.commitMessage = message.commitMessage; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings"; + }; + + return GenAppBuilderSettings; + })(); + + Agent.AnswerFeedbackSettings = (function() { + + /** + * Properties of an AnswerFeedbackSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @interface IAnswerFeedbackSettings + * @property {boolean|null} [enableAnswerFeedback] AnswerFeedbackSettings enableAnswerFeedback + */ + + /** + * Constructs a new AnswerFeedbackSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @classdesc Represents an AnswerFeedbackSettings. + * @implements IAnswerFeedbackSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings=} [properties] Properties to set + */ + function AnswerFeedbackSettings(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]]; + } + + /** + * AnswerFeedbackSettings enableAnswerFeedback. + * @member {boolean} enableAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @instance + */ + AnswerFeedbackSettings.prototype.enableAnswerFeedback = false; + + /** + * Creates a new AnswerFeedbackSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings instance + */ + AnswerFeedbackSettings.create = function create(properties) { + return new AnswerFeedbackSettings(properties); + }; + + /** + * Encodes the specified AnswerFeedbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings} message AnswerFeedbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedbackSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableAnswerFeedback != null && Object.hasOwnProperty.call(message, "enableAnswerFeedback")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableAnswerFeedback); + return writer; + }; + + /** + * Encodes the specified AnswerFeedbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.IAnswerFeedbackSettings} message AnswerFeedbackSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedbackSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedbackSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableAnswerFeedback = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerFeedbackSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedbackSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerFeedbackSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerFeedbackSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableAnswerFeedback != null && message.hasOwnProperty("enableAnswerFeedback")) + if (typeof message.enableAnswerFeedback !== "boolean") + return "enableAnswerFeedback: boolean expected"; + return null; + }; + + /** + * Creates an AnswerFeedbackSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} AnswerFeedbackSettings + */ + AnswerFeedbackSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings(); + if (object.enableAnswerFeedback != null) + message.enableAnswerFeedback = Boolean(object.enableAnswerFeedback); + return message; + }; + + /** + * Creates a plain object from an AnswerFeedbackSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings} message AnswerFeedbackSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerFeedbackSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableAnswerFeedback = false; + if (message.enableAnswerFeedback != null && message.hasOwnProperty("enableAnswerFeedback")) + object.enableAnswerFeedback = message.enableAnswerFeedback; return object; }; /** - * Converts this GitDestination to JSON. + * Converts this AnswerFeedbackSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings * @instance * @returns {Object.} JSON object */ - GitDestination.prototype.toJSON = function toJSON() { + AnswerFeedbackSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GitDestination + * Gets the default type url for AnswerFeedbackSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GitDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnswerFeedbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings"; }; - return GitDestination; + return AnswerFeedbackSettings; })(); - return ExportAgentRequest; + return Agent; })(); - v3beta1.ExportAgentResponse = (function() { + v3beta1.ListAgentsRequest = (function() { /** - * Properties of an ExportAgentResponse. + * Properties of a ListAgentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportAgentResponse - * @property {string|null} [agentUri] ExportAgentResponse agentUri - * @property {Uint8Array|null} [agentContent] ExportAgentResponse agentContent - * @property {string|null} [commitSha] ExportAgentResponse commitSha + * @interface IListAgentsRequest + * @property {string|null} [parent] ListAgentsRequest parent + * @property {number|null} [pageSize] ListAgentsRequest pageSize + * @property {string|null} [pageToken] ListAgentsRequest pageToken */ /** - * Constructs a new ExportAgentResponse. + * Constructs a new ListAgentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportAgentResponse. - * @implements IExportAgentResponse + * @classdesc Represents a ListAgentsRequest. + * @implements IListAgentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set */ - function ExportAgentResponse(properties) { + function ListAgentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85014,117 +88357,103 @@ } /** - * ExportAgentResponse agentUri. - * @member {string|null|undefined} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * ListAgentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance */ - ExportAgentResponse.prototype.agentUri = null; + ListAgentsRequest.prototype.parent = ""; /** - * ExportAgentResponse agentContent. - * @member {Uint8Array|null|undefined} agentContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * ListAgentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance */ - ExportAgentResponse.prototype.agentContent = null; + ListAgentsRequest.prototype.pageSize = 0; /** - * ExportAgentResponse commitSha. - * @member {string|null|undefined} commitSha - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * ListAgentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance */ - ExportAgentResponse.prototype.commitSha = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListAgentsRequest.prototype.pageToken = ""; /** - * ExportAgentResponse agent. - * @member {"agentUri"|"agentContent"|"commitSha"|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse - * @instance - */ - Object.defineProperty(ExportAgentResponse.prototype, "agent", { - get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent", "commitSha"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportAgentResponse instance using the specified properties. + * Creates a new ListAgentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest instance */ - ExportAgentResponse.create = function create(properties) { - return new ExportAgentResponse(properties); + ListAgentsRequest.create = function create(properties) { + return new ListAgentsRequest(properties); }; /** - * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentResponse.encode = function encode(message, writer) { + ListAgentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentUri); - if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.agentContent); - if (message.commitSha != null && Object.hasOwnProperty.call(message, "commitSha")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.commitSha); + 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 ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. + * Encodes the specified ListAgentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsRequest} message ListAgentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportAgentResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAgentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportAgentResponse message from the specified reader or buffer. + * Decodes a ListAgentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentResponse.decode = function decode(reader, length) { + ListAgentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.agentUri = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.agentContent = reader.bytes(); + message.pageSize = reader.int32(); break; } case 3: { - message.commitSha = reader.string(); + message.pageToken = reader.string(); break; } default: @@ -85136,161 +88465,141 @@ }; /** - * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportAgentResponse.decodeDelimited = function decodeDelimited(reader) { + ListAgentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportAgentResponse message. + * Verifies a ListAgentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportAgentResponse.verify = function verify(message) { + ListAgentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - properties.agent = 1; - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) - return "agentContent: buffer expected"; - } - if (message.commitSha != null && message.hasOwnProperty("commitSha")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - if (!$util.isString(message.commitSha)) - return "commitSha: 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 an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} ListAgentsRequest */ - ExportAgentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse) + ListAgentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); - if (object.agentContent != null) - if (typeof object.agentContent === "string") - $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); - else if (object.agentContent.length >= 0) - message.agentContent = object.agentContent; - if (object.commitSha != null) - message.commitSha = String(object.commitSha); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest(); + 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 an ExportAgentResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAgentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} message ExportAgentResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest} message ListAgentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportAgentResponse.toObject = function toObject(message, options) { + ListAgentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - object.agentUri = message.agentUri; - if (options.oneofs) - object.agent = "agentUri"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; - if (options.oneofs) - object.agent = "agentContent"; - } - if (message.commitSha != null && message.hasOwnProperty("commitSha")) { - object.commitSha = message.commitSha; - if (options.oneofs) - object.agent = "commitSha"; + 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 ExportAgentResponse to JSON. + * Converts this ListAgentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @instance * @returns {Object.} JSON object */ - ExportAgentResponse.prototype.toJSON = function toJSON() { + ListAgentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportAgentResponse + * Gets the default type url for ListAgentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportAgentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAgentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest"; }; - return ExportAgentResponse; + return ListAgentsRequest; })(); - v3beta1.RestoreAgentRequest = (function() { + v3beta1.ListAgentsResponse = (function() { /** - * Properties of a RestoreAgentRequest. + * Properties of a ListAgentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRestoreAgentRequest - * @property {string|null} [name] RestoreAgentRequest name - * @property {string|null} [agentUri] RestoreAgentRequest agentUri - * @property {Uint8Array|null} [agentContent] RestoreAgentRequest agentContent - * @property {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null} [gitSource] RestoreAgentRequest gitSource - * @property {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|null} [restoreOption] RestoreAgentRequest restoreOption + * @interface IListAgentsResponse + * @property {Array.|null} [agents] ListAgentsResponse agents + * @property {string|null} [nextPageToken] ListAgentsResponse nextPageToken */ /** - * Constructs a new RestoreAgentRequest. + * Constructs a new ListAgentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RestoreAgentRequest. - * @implements IRestoreAgentRequest + * @classdesc Represents a ListAgentsResponse. + * @implements IListAgentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set */ - function RestoreAgentRequest(properties) { + function ListAgentsResponse(properties) { + this.agents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85298,145 +88607,92 @@ } /** - * RestoreAgentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.name = ""; - - /** - * RestoreAgentRequest agentUri. - * @member {string|null|undefined} agentUri - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.agentUri = null; - - /** - * RestoreAgentRequest agentContent. - * @member {Uint8Array|null|undefined} agentContent - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.agentContent = null; - - /** - * RestoreAgentRequest gitSource. - * @member {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null|undefined} gitSource - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @instance - */ - RestoreAgentRequest.prototype.gitSource = null; - - /** - * RestoreAgentRequest restoreOption. - * @member {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption} restoreOption - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * ListAgentsResponse agents. + * @member {Array.} agents + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance */ - RestoreAgentRequest.prototype.restoreOption = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListAgentsResponse.prototype.agents = $util.emptyArray; /** - * RestoreAgentRequest agent. - * @member {"agentUri"|"agentContent"|"gitSource"|undefined} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * ListAgentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance */ - Object.defineProperty(RestoreAgentRequest.prototype, "agent", { - get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent", "gitSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListAgentsResponse.prototype.nextPageToken = ""; /** - * Creates a new RestoreAgentRequest instance using the specified properties. + * Creates a new ListAgentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse instance */ - RestoreAgentRequest.create = function create(properties) { - return new RestoreAgentRequest(properties); + ListAgentsResponse.create = function create(properties) { + return new ListAgentsResponse(properties); }; /** - * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreAgentRequest.encode = function encode(message, writer) { + ListAgentsResponse.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.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); - if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.agentContent); - if (message.restoreOption != null && Object.hasOwnProperty.call(message, "restoreOption")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.restoreOption); - if (message.gitSource != null && Object.hasOwnProperty.call(message, "gitSource")) - $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.encode(message.gitSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.agents != null && message.agents.length) + for (var i = 0; i < message.agents.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agents[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 RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. + * Encodes the specified ListAgentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListAgentsResponse} message ListAgentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAgentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer. + * Decodes a ListAgentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreAgentRequest.decode = function decode(reader, length) { + ListAgentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.agents && message.agents.length)) + message.agents = []; + message.agents.push($root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32())); break; } case 2: { - message.agentUri = reader.string(); - break; - } - case 3: { - message.agentContent = reader.bytes(); - break; - } - case 6: { - message.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.decode(reader, reader.uint32()); - break; - } - case 5: { - message.restoreOption = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -85448,425 +88704,148 @@ }; /** - * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAgentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreAgentRequest.decodeDelimited = function decodeDelimited(reader) { + ListAgentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreAgentRequest message. + * Verifies a ListAgentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreAgentRequest.verify = function verify(message) { + ListAgentsResponse.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.agentUri != null && message.hasOwnProperty("agentUri")) { - properties.agent = 1; - if (!$util.isString(message.agentUri)) - return "agentUri: string expected"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) - return "agentContent: buffer expected"; - } - if (message.gitSource != null && message.hasOwnProperty("gitSource")) { - if (properties.agent === 1) - return "agent: multiple values"; - properties.agent = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify(message.gitSource); + if (message.agents != null && message.hasOwnProperty("agents")) { + if (!Array.isArray(message.agents)) + return "agents: array expected"; + for (var i = 0; i < message.agents.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agents[i]); if (error) - return "gitSource." + error; + return "agents." + error; } } - if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) - switch (message.restoreOption) { - default: - return "restoreOption: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAgentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} ListAgentsResponse */ - RestoreAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest) + ListAgentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.agentUri != null) - message.agentUri = String(object.agentUri); - if (object.agentContent != null) - if (typeof object.agentContent === "string") - $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); - else if (object.agentContent.length >= 0) - message.agentContent = object.agentContent; - if (object.gitSource != null) { - if (typeof object.gitSource !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.gitSource: object expected"); - message.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.fromObject(object.gitSource); - } - switch (object.restoreOption) { - default: - if (typeof object.restoreOption === "number") { - message.restoreOption = object.restoreOption; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse(); + if (object.agents) { + if (!Array.isArray(object.agents)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: array expected"); + message.agents = []; + for (var i = 0; i < object.agents.length; ++i) { + if (typeof object.agents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents: object expected"); + message.agents[i] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agents[i]); } - break; - case "RESTORE_OPTION_UNSPECIFIED": - case 0: - message.restoreOption = 0; - break; - case "KEEP": - case 1: - message.restoreOption = 1; - break; - case "FALLBACK": - case 2: - message.restoreOption = 2; - break; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAgentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} message RestoreAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse} message ListAgentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreAgentRequest.toObject = function toObject(message, options) { + ListAgentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.restoreOption = options.enums === String ? "RESTORE_OPTION_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.agentUri != null && message.hasOwnProperty("agentUri")) { - object.agentUri = message.agentUri; - if (options.oneofs) - object.agent = "agentUri"; - } - if (message.agentContent != null && message.hasOwnProperty("agentContent")) { - object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; - if (options.oneofs) - object.agent = "agentContent"; - } - if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) - object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] === undefined ? message.restoreOption : $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; - if (message.gitSource != null && message.hasOwnProperty("gitSource")) { - object.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.toObject(message.gitSource, options); - if (options.oneofs) - object.agent = "gitSource"; + if (options.arrays || options.defaults) + object.agents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.agents && message.agents.length) { + object.agents = []; + for (var j = 0; j < message.agents.length; ++j) + object.agents[j] = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agents[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this RestoreAgentRequest to JSON. + * Converts this ListAgentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @instance * @returns {Object.} JSON object */ - RestoreAgentRequest.prototype.toJSON = function toJSON() { + ListAgentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreAgentRequest + * Gets the default type url for ListAgentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAgentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse"; }; - RestoreAgentRequest.GitSource = (function() { - - /** - * Properties of a GitSource. - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @interface IGitSource - * @property {string|null} [trackingBranch] GitSource trackingBranch - */ - - /** - * Constructs a new GitSource. - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest - * @classdesc Represents a GitSource. - * @implements IGitSource - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource=} [properties] Properties to set - */ - function GitSource(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]]; - } - - /** - * GitSource trackingBranch. - * @member {string} trackingBranch - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @instance - */ - GitSource.prototype.trackingBranch = ""; - - /** - * Creates a new GitSource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource instance - */ - GitSource.create = function create(properties) { - return new GitSource(properties); - }; - - /** - * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource} message GitSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingBranch); - return writer; - }; - - /** - * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource} message GitSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GitSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GitSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.trackingBranch = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GitSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GitSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GitSource message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GitSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - if (!$util.isString(message.trackingBranch)) - return "trackingBranch: string expected"; - return null; - }; - - /** - * Creates a GitSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource - */ - GitSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource(); - if (object.trackingBranch != null) - message.trackingBranch = String(object.trackingBranch); - return message; - }; - - /** - * Creates a plain object from a GitSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} message GitSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GitSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.trackingBranch = ""; - if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) - object.trackingBranch = message.trackingBranch; - return object; - }; - - /** - * Converts this GitSource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @instance - * @returns {Object.} JSON object - */ - GitSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GitSource - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GitSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource"; - }; - - return GitSource; - })(); - - /** - * RestoreOption enum. - * @name google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption - * @enum {number} - * @property {number} RESTORE_OPTION_UNSPECIFIED=0 RESTORE_OPTION_UNSPECIFIED value - * @property {number} KEEP=1 KEEP value - * @property {number} FALLBACK=2 FALLBACK value - */ - RestoreAgentRequest.RestoreOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTORE_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "KEEP"] = 1; - values[valuesById[2] = "FALLBACK"] = 2; - return values; - })(); - - return RestoreAgentRequest; + return ListAgentsResponse; })(); - v3beta1.ValidateAgentRequest = (function() { + v3beta1.GetAgentRequest = (function() { /** - * Properties of a ValidateAgentRequest. + * Properties of a GetAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IValidateAgentRequest - * @property {string|null} [name] ValidateAgentRequest name - * @property {string|null} [languageCode] ValidateAgentRequest languageCode + * @interface IGetAgentRequest + * @property {string|null} [name] GetAgentRequest name */ /** - * Constructs a new ValidateAgentRequest. + * Constructs a new GetAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ValidateAgentRequest. - * @implements IValidateAgentRequest + * @classdesc Represents a GetAgentRequest. + * @implements IGetAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set */ - function ValidateAgentRequest(properties) { + function GetAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85874,80 +88853,70 @@ } /** - * ValidateAgentRequest name. + * GetAgentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest - * @instance - */ - ValidateAgentRequest.prototype.name = ""; - - /** - * ValidateAgentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @instance */ - ValidateAgentRequest.prototype.languageCode = ""; + GetAgentRequest.prototype.name = ""; /** - * Creates a new ValidateAgentRequest instance using the specified properties. + * Creates a new GetAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest instance */ - ValidateAgentRequest.create = function create(properties) { - return new ValidateAgentRequest(properties); + GetAgentRequest.create = function create(properties) { + return new GetAgentRequest(properties); }; /** - * Encodes the specified ValidateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. + * Encodes the specified GetAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} message ValidateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateAgentRequest.encode = function encode(message, writer) { + GetAgentRequest.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 ValidateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. + * Encodes the specified GetAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} message ValidateAgentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentRequest} message GetAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateAgentRequest message from the specified reader or buffer. + * Decodes a GetAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateAgentRequest.decode = function decode(reader, length) { + GetAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -85955,10 +88924,6 @@ message.name = reader.string(); break; } - case 2: { - message.languageCode = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -85968,132 +88933,123 @@ }; /** - * Decodes a ValidateAgentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateAgentRequest.decodeDelimited = function decodeDelimited(reader) { + GetAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateAgentRequest message. + * Verifies a GetAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateAgentRequest.verify = function verify(message) { + GetAgentRequest.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 ValidateAgentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} GetAgentRequest */ - ValidateAgentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) + GetAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest(); 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 ValidateAgentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} message ValidateAgentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentRequest} message GetAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateAgentRequest.toObject = function toObject(message, options) { + GetAgentRequest.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 ValidateAgentRequest to JSON. + * Converts this GetAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @instance * @returns {Object.} JSON object */ - ValidateAgentRequest.prototype.toJSON = function toJSON() { + GetAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidateAgentRequest + * Gets the default type url for GetAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetAgentRequest"; }; - return ValidateAgentRequest; + return GetAgentRequest; })(); - v3beta1.GetAgentValidationResultRequest = (function() { + v3beta1.CreateAgentRequest = (function() { /** - * Properties of a GetAgentValidationResultRequest. + * Properties of a CreateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetAgentValidationResultRequest - * @property {string|null} [name] GetAgentValidationResultRequest name - * @property {string|null} [languageCode] GetAgentValidationResultRequest languageCode + * @interface ICreateAgentRequest + * @property {string|null} [parent] CreateAgentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] CreateAgentRequest agent */ /** - * Constructs a new GetAgentValidationResultRequest. + * Constructs a new CreateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetAgentValidationResultRequest. - * @implements IGetAgentValidationResultRequest + * @classdesc Represents a CreateAgentRequest. + * @implements ICreateAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set */ - function GetAgentValidationResultRequest(properties) { + function CreateAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86101,89 +89057,89 @@ } /** - * GetAgentValidationResultRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * CreateAgentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @instance */ - GetAgentValidationResultRequest.prototype.name = ""; + CreateAgentRequest.prototype.parent = ""; /** - * GetAgentValidationResultRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * CreateAgentRequest agent. + * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @instance */ - GetAgentValidationResultRequest.prototype.languageCode = ""; + CreateAgentRequest.prototype.agent = null; /** - * Creates a new GetAgentValidationResultRequest instance using the specified properties. + * Creates a new CreateAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest instance */ - GetAgentValidationResultRequest.create = function create(properties) { - return new GetAgentValidationResultRequest(properties); + CreateAgentRequest.create = function create(properties) { + return new CreateAgentRequest(properties); }; /** - * Encodes the specified GetAgentValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. + * Encodes the specified CreateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} message GetAgentValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentValidationResultRequest.encode = function encode(message, writer) { + CreateAgentRequest.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.agent != null && Object.hasOwnProperty.call(message, "agent")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetAgentValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. + * Encodes the specified CreateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} message GetAgentValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateAgentRequest} message CreateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAgentValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer. + * Decodes a CreateAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentValidationResultRequest.decode = function decode(reader, length) { + CreateAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.languageCode = reader.string(); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); break; } default: @@ -86195,133 +89151,137 @@ }; /** - * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAgentValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAgentValidationResultRequest message. + * Verifies a CreateAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAgentValidationResultRequest.verify = function verify(message) { + CreateAgentRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.agent != null && message.hasOwnProperty("agent")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); + if (error) + return "agent." + error; + } return null; }; /** - * Creates a GetAgentValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} CreateAgentRequest */ - GetAgentValidationResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) + CreateAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(); - 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.v3beta1.CreateAgentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.agent != null) { + if (typeof object.agent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.agent: object expected"); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); + } return message; }; /** - * Creates a plain object from a GetAgentValidationResultRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} message GetAgentValidationResultRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest} message CreateAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAgentValidationResultRequest.toObject = function toObject(message, options) { + CreateAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.parent = ""; + object.agent = 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.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); return object; }; /** - * Converts this GetAgentValidationResultRequest to JSON. + * Converts this CreateAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @instance * @returns {Object.} JSON object */ - GetAgentValidationResultRequest.prototype.toJSON = function toJSON() { + CreateAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAgentValidationResultRequest + * Gets the default type url for CreateAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAgentValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest"; }; - return GetAgentValidationResultRequest; + return CreateAgentRequest; })(); - v3beta1.AgentValidationResult = (function() { + v3beta1.UpdateAgentRequest = (function() { /** - * Properties of an AgentValidationResult. + * Properties of an UpdateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IAgentValidationResult - * @property {string|null} [name] AgentValidationResult name - * @property {Array.|null} [flowValidationResults] AgentValidationResult flowValidationResults + * @interface IUpdateAgentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IAgent|null} [agent] UpdateAgentRequest agent + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAgentRequest updateMask */ /** - * Constructs a new AgentValidationResult. + * Constructs a new UpdateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an AgentValidationResult. - * @implements IAgentValidationResult + * @classdesc Represents an UpdateAgentRequest. + * @implements IUpdateAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set */ - function AgentValidationResult(properties) { - this.flowValidationResults = []; + function UpdateAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86329,92 +89289,89 @@ } /** - * AgentValidationResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * UpdateAgentRequest agent. + * @member {google.cloud.dialogflow.cx.v3beta1.IAgent|null|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @instance */ - AgentValidationResult.prototype.name = ""; + UpdateAgentRequest.prototype.agent = null; /** - * AgentValidationResult flowValidationResults. - * @member {Array.} flowValidationResults - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * UpdateAgentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @instance */ - AgentValidationResult.prototype.flowValidationResults = $util.emptyArray; + UpdateAgentRequest.prototype.updateMask = null; /** - * Creates a new AgentValidationResult instance using the specified properties. + * Creates a new UpdateAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest instance */ - AgentValidationResult.create = function create(properties) { - return new AgentValidationResult(properties); + UpdateAgentRequest.create = function create(properties) { + return new UpdateAgentRequest(properties); }; /** - * Encodes the specified AgentValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. + * Encodes the specified UpdateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult} message AgentValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentValidationResult.encode = function encode(message, writer) { + UpdateAgentRequest.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.flowValidationResults != null && message.flowValidationResults.length) - for (var i = 0; i < message.flowValidationResults.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.encode(message.flowValidationResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + $root.google.cloud.dialogflow.cx.v3beta1.Agent.encode(message.agent, 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 AgentValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. + * Encodes the specified UpdateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult} message AgentValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateAgentRequest} message UpdateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AgentValidationResult message from the specified reader or buffer. + * Decodes an UpdateAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentValidationResult.decode = function decode(reader, length) { + UpdateAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.flowValidationResults && message.flowValidationResults.length)) - message.flowValidationResults = []; - message.flowValidationResults.push($root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -86426,149 +89383,141 @@ }; /** - * Decodes an AgentValidationResult message from the specified reader or buffer, length delimited. + * Decodes an UpdateAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentValidationResult.decodeDelimited = function decodeDelimited(reader) { + UpdateAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AgentValidationResult message. + * Verifies an UpdateAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AgentValidationResult.verify = function verify(message) { + UpdateAgentRequest.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.flowValidationResults != null && message.hasOwnProperty("flowValidationResults")) { - if (!Array.isArray(message.flowValidationResults)) - return "flowValidationResults: array expected"; - for (var i = 0; i < message.flowValidationResults.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify(message.flowValidationResults[i]); - if (error) - return "flowValidationResults." + error; - } + if (message.agent != null && message.hasOwnProperty("agent")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Agent.verify(message.agent); + if (error) + return "agent." + 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 AgentValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} UpdateAgentRequest */ - AgentValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) + UpdateAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(); - if (object.name != null) - message.name = String(object.name); - if (object.flowValidationResults) { - if (!Array.isArray(object.flowValidationResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.flowValidationResults: array expected"); - message.flowValidationResults = []; - for (var i = 0; i < object.flowValidationResults.length; ++i) { - if (typeof object.flowValidationResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.flowValidationResults: object expected"); - message.flowValidationResults[i] = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.fromObject(object.flowValidationResults[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest(); + if (object.agent != null) { + if (typeof object.agent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.agent: object expected"); + message.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.fromObject(object.agent); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an AgentValidationResult message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} message AgentValidationResult + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest} message UpdateAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AgentValidationResult.toObject = function toObject(message, options) { + UpdateAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.flowValidationResults = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.flowValidationResults && message.flowValidationResults.length) { - object.flowValidationResults = []; - for (var j = 0; j < message.flowValidationResults.length; ++j) - object.flowValidationResults[j] = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.toObject(message.flowValidationResults[j], options); + if (options.defaults) { + object.agent = null; + object.updateMask = null; } + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = $root.google.cloud.dialogflow.cx.v3beta1.Agent.toObject(message.agent, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this AgentValidationResult to JSON. + * Converts this UpdateAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @instance * @returns {Object.} JSON object */ - AgentValidationResult.prototype.toJSON = function toJSON() { + UpdateAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AgentValidationResult + * Gets the default type url for UpdateAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AgentValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AgentValidationResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest"; }; - return AgentValidationResult; + return UpdateAgentRequest; })(); - v3beta1.GetGenerativeSettingsRequest = (function() { + v3beta1.DeleteAgentRequest = (function() { /** - * Properties of a GetGenerativeSettingsRequest. + * Properties of a DeleteAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetGenerativeSettingsRequest - * @property {string|null} [name] GetGenerativeSettingsRequest name - * @property {string|null} [languageCode] GetGenerativeSettingsRequest languageCode + * @interface IDeleteAgentRequest + * @property {string|null} [name] DeleteAgentRequest name */ /** - * Constructs a new GetGenerativeSettingsRequest. + * Constructs a new DeleteAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetGenerativeSettingsRequest. - * @implements IGetGenerativeSettingsRequest + * @classdesc Represents a DeleteAgentRequest. + * @implements IDeleteAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set */ - function GetGenerativeSettingsRequest(properties) { + function DeleteAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86576,80 +89525,70 @@ } /** - * GetGenerativeSettingsRequest name. + * DeleteAgentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest - * @instance - */ - GetGenerativeSettingsRequest.prototype.name = ""; - - /** - * GetGenerativeSettingsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @instance */ - GetGenerativeSettingsRequest.prototype.languageCode = ""; + DeleteAgentRequest.prototype.name = ""; /** - * Creates a new GetGenerativeSettingsRequest instance using the specified properties. + * Creates a new DeleteAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest instance */ - GetGenerativeSettingsRequest.create = function create(properties) { - return new GetGenerativeSettingsRequest(properties); + DeleteAgentRequest.create = function create(properties) { + return new DeleteAgentRequest(properties); }; /** - * Encodes the specified GetGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. + * Encodes the specified DeleteAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} message GetGenerativeSettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGenerativeSettingsRequest.encode = function encode(message, writer) { + DeleteAgentRequest.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 GetGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. + * Encodes the specified DeleteAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} message GetGenerativeSettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteAgentRequest} message DeleteAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGenerativeSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer. + * Decodes a DeleteAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGenerativeSettingsRequest.decode = function decode(reader, length) { + DeleteAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -86657,10 +89596,6 @@ message.name = reader.string(); break; } - case 2: { - message.languageCode = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -86670,132 +89605,127 @@ }; /** - * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGenerativeSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetGenerativeSettingsRequest message. + * Verifies a DeleteAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetGenerativeSettingsRequest.verify = function verify(message) { + DeleteAgentRequest.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 GetGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} DeleteAgentRequest */ - GetGenerativeSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) + DeleteAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest(); 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 GetGenerativeSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} message GetGenerativeSettingsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest} message DeleteAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetGenerativeSettingsRequest.toObject = function toObject(message, options) { + DeleteAgentRequest.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 GetGenerativeSettingsRequest to JSON. + * Converts this DeleteAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @instance * @returns {Object.} JSON object */ - GetGenerativeSettingsRequest.prototype.toJSON = function toJSON() { + DeleteAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetGenerativeSettingsRequest + * Gets the default type url for DeleteAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetGenerativeSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest"; }; - return GetGenerativeSettingsRequest; + return DeleteAgentRequest; })(); - v3beta1.UpdateGenerativeSettingsRequest = (function() { + v3beta1.ExportAgentRequest = (function() { /** - * Properties of an UpdateGenerativeSettingsRequest. + * Properties of an ExportAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateGenerativeSettingsRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null} [generativeSettings] UpdateGenerativeSettingsRequest generativeSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGenerativeSettingsRequest updateMask + * @interface IExportAgentRequest + * @property {string|null} [name] ExportAgentRequest name + * @property {string|null} [agentUri] ExportAgentRequest agentUri + * @property {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null} [dataFormat] ExportAgentRequest dataFormat + * @property {string|null} [environment] ExportAgentRequest environment + * @property {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null} [gitDestination] ExportAgentRequest gitDestination + * @property {boolean|null} [includeBigqueryExportSettings] ExportAgentRequest includeBigqueryExportSettings */ /** - * Constructs a new UpdateGenerativeSettingsRequest. + * Constructs a new ExportAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateGenerativeSettingsRequest. - * @implements IUpdateGenerativeSettingsRequest + * @classdesc Represents an ExportAgentRequest. + * @implements IExportAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set */ - function UpdateGenerativeSettingsRequest(properties) { + function ExportAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86803,89 +89733,145 @@ } /** - * UpdateGenerativeSettingsRequest generativeSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null|undefined} generativeSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * ExportAgentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance */ - UpdateGenerativeSettingsRequest.prototype.generativeSettings = null; + ExportAgentRequest.prototype.name = ""; /** - * UpdateGenerativeSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * ExportAgentRequest agentUri. + * @member {string} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance */ - UpdateGenerativeSettingsRequest.prototype.updateMask = null; + ExportAgentRequest.prototype.agentUri = ""; /** - * Creates a new UpdateGenerativeSettingsRequest instance using the specified properties. + * ExportAgentRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.dataFormat = 0; + + /** + * ExportAgentRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.environment = ""; + + /** + * ExportAgentRequest gitDestination. + * @member {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination|null|undefined} gitDestination + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.gitDestination = null; + + /** + * ExportAgentRequest includeBigqueryExportSettings. + * @member {boolean} includeBigqueryExportSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.includeBigqueryExportSettings = false; + + /** + * Creates a new ExportAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest instance */ - UpdateGenerativeSettingsRequest.create = function create(properties) { - return new UpdateGenerativeSettingsRequest(properties); + ExportAgentRequest.create = function create(properties) { + return new ExportAgentRequest(properties); }; /** - * Encodes the specified UpdateGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * Encodes the specified ExportAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGenerativeSettingsRequest.encode = function encode(message, writer) { + ExportAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.generativeSettings != null && Object.hasOwnProperty.call(message, "generativeSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.encode(message.generativeSettings, 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.environment); + if (message.gitDestination != null && Object.hasOwnProperty.call(message, "gitDestination")) + $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.encode(message.gitDestination, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.includeBigqueryExportSettings != null && Object.hasOwnProperty.call(message, "includeBigqueryExportSettings")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeBigqueryExportSettings); return writer; }; /** - * Encodes the specified UpdateGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * Encodes the specified ExportAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentRequest} message ExportAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGenerativeSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer. + * Decodes an ExportAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGenerativeSettingsRequest.decode = function decode(reader, length) { + ExportAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.agentUri = reader.string(); + break; + } + case 3: { + message.dataFormat = reader.int32(); + break; + } + case 5: { + message.environment = reader.string(); + break; + } + case 6: { + message.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.decode(reader, reader.uint32()); + break; + } + case 7: { + message.includeBigqueryExportSettings = reader.bool(); break; } default: @@ -86897,188 +89883,437 @@ }; /** - * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGenerativeSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ExportAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateGenerativeSettingsRequest message. + * Verifies an ExportAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateGenerativeSettingsRequest.verify = function verify(message) { + ExportAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.generativeSettings != null && message.hasOwnProperty("generativeSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify(message.generativeSettings); - if (error) - return "generativeSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + case 4: + break; + } + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.gitDestination != null && message.hasOwnProperty("gitDestination")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify(message.gitDestination); if (error) - return "updateMask." + error; + return "gitDestination." + error; } + if (message.includeBigqueryExportSettings != null && message.hasOwnProperty("includeBigqueryExportSettings")) + if (typeof message.includeBigqueryExportSettings !== "boolean") + return "includeBigqueryExportSettings: boolean expected"; return null; }; /** - * Creates an UpdateGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} ExportAgentRequest */ - UpdateGenerativeSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + ExportAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(); - if (object.generativeSettings != null) { - if (typeof object.generativeSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.generativeSettings: object expected"); - message.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.fromObject(object.generativeSettings); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); + 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 4: + message.dataFormat = 4; + break; } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.environment != null) + message.environment = String(object.environment); + if (object.gitDestination != null) { + if (typeof object.gitDestination !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.gitDestination: object expected"); + message.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.fromObject(object.gitDestination); } + if (object.includeBigqueryExportSettings != null) + message.includeBigqueryExportSettings = Boolean(object.includeBigqueryExportSettings); return message; }; /** - * Creates a plain object from an UpdateGenerativeSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest} message ExportAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateGenerativeSettingsRequest.toObject = function toObject(message, options) { + ExportAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.generativeSettings = null; - object.updateMask = null; + object.name = ""; + object.agentUri = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.environment = ""; + object.gitDestination = null; + object.includeBigqueryExportSettings = false; } - if (message.generativeSettings != null && message.hasOwnProperty("generativeSettings")) - object.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.toObject(message.generativeSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) + object.agentUri = message.agentUri; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.gitDestination != null && message.hasOwnProperty("gitDestination")) + object.gitDestination = $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.toObject(message.gitDestination, options); + if (message.includeBigqueryExportSettings != null && message.hasOwnProperty("includeBigqueryExportSettings")) + object.includeBigqueryExportSettings = message.includeBigqueryExportSettings; return object; }; /** - * Converts this UpdateGenerativeSettingsRequest to JSON. + * Converts this ExportAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @instance * @returns {Object.} JSON object */ - UpdateGenerativeSettingsRequest.prototype.toJSON = function toJSON() { + ExportAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateGenerativeSettingsRequest + * Gets the default type url for ExportAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateGenerativeSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest"; }; - return UpdateGenerativeSettingsRequest; - })(); + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + * @property {number} JSON_PACKAGE=4 JSON_PACKAGE value + */ + ExportAgentRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + values[valuesById[4] = "JSON_PACKAGE"] = 4; + return values; + })(); - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding - * @enum {number} - * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value - * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value - * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value - * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value - * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value - * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value - * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value - * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value - */ - v3beta1.AudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; - values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; - values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; - values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; - values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; - values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; - return values; - })(); + ExportAgentRequest.GitDestination = (function() { - /** - * SpeechModelVariant enum. - * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant - * @enum {number} - * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value - * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value - * @property {number} USE_STANDARD=2 USE_STANDARD value - * @property {number} USE_ENHANCED=3 USE_ENHANCED value - */ - v3beta1.SpeechModelVariant = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; - values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; - values[valuesById[2] = "USE_STANDARD"] = 2; - values[valuesById[3] = "USE_ENHANCED"] = 3; - return values; + /** + * Properties of a GitDestination. + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @interface IGitDestination + * @property {string|null} [trackingBranch] GitDestination trackingBranch + * @property {string|null} [commitMessage] GitDestination commitMessage + */ + + /** + * Constructs a new GitDestination. + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @classdesc Represents a GitDestination. + * @implements IGitDestination + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination=} [properties] Properties to set + */ + function GitDestination(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]]; + } + + /** + * GitDestination trackingBranch. + * @member {string} trackingBranch + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @instance + */ + GitDestination.prototype.trackingBranch = ""; + + /** + * GitDestination commitMessage. + * @member {string} commitMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @instance + */ + GitDestination.prototype.commitMessage = ""; + + /** + * Creates a new GitDestination instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination instance + */ + GitDestination.create = function create(properties) { + return new GitDestination(properties); + }; + + /** + * Encodes the specified GitDestination message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination} message GitDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingBranch); + if (message.commitMessage != null && Object.hasOwnProperty.call(message, "commitMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitMessage); + return writer; + }; + + /** + * Encodes the specified GitDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.IGitDestination} message GitDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trackingBranch = reader.string(); + break; + } + case 2: { + message.commitMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitDestination message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + if (!$util.isString(message.trackingBranch)) + return "trackingBranch: string expected"; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + if (!$util.isString(message.commitMessage)) + return "commitMessage: string expected"; + return null; + }; + + /** + * Creates a GitDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} GitDestination + */ + GitDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination(); + if (object.trackingBranch != null) + message.trackingBranch = String(object.trackingBranch); + if (object.commitMessage != null) + message.commitMessage = String(object.commitMessage); + return message; + }; + + /** + * Creates a plain object from a GitDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination} message GitDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.trackingBranch = ""; + object.commitMessage = ""; + } + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + object.trackingBranch = message.trackingBranch; + if (message.commitMessage != null && message.hasOwnProperty("commitMessage")) + object.commitMessage = message.commitMessage; + return object; + }; + + /** + * Converts this GitDestination to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @instance + * @returns {Object.} JSON object + */ + GitDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitDestination + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.GitDestination"; + }; + + return GitDestination; + })(); + + return ExportAgentRequest; })(); - v3beta1.SpeechWordInfo = (function() { + v3beta1.ExportAgentResponse = (function() { /** - * Properties of a SpeechWordInfo. + * Properties of an ExportAgentResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISpeechWordInfo - * @property {string|null} [word] SpeechWordInfo word - * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset - * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset - * @property {number|null} [confidence] SpeechWordInfo confidence + * @interface IExportAgentResponse + * @property {string|null} [agentUri] ExportAgentResponse agentUri + * @property {Uint8Array|null} [agentContent] ExportAgentResponse agentContent + * @property {string|null} [commitSha] ExportAgentResponse commitSha */ /** - * Constructs a new SpeechWordInfo. + * Constructs a new ExportAgentResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SpeechWordInfo. - * @implements ISpeechWordInfo + * @classdesc Represents an ExportAgentResponse. + * @implements IExportAgentResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set */ - function SpeechWordInfo(properties) { + function ExportAgentResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87086,117 +90321,117 @@ } /** - * SpeechWordInfo word. - * @member {string} word - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * ExportAgentResponse agentUri. + * @member {string|null|undefined} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - SpeechWordInfo.prototype.word = ""; + ExportAgentResponse.prototype.agentUri = null; /** - * SpeechWordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * ExportAgentResponse agentContent. + * @member {Uint8Array|null|undefined} agentContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - SpeechWordInfo.prototype.startOffset = null; + ExportAgentResponse.prototype.agentContent = null; /** - * SpeechWordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * ExportAgentResponse commitSha. + * @member {string|null|undefined} commitSha + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - SpeechWordInfo.prototype.endOffset = null; + ExportAgentResponse.prototype.commitSha = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * SpeechWordInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * ExportAgentResponse agent. + * @member {"agentUri"|"agentContent"|"commitSha"|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance */ - SpeechWordInfo.prototype.confidence = 0; + Object.defineProperty(ExportAgentResponse.prototype, "agent", { + get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent", "commitSha"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new ExportAgentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse instance */ - SpeechWordInfo.create = function create(properties) { - return new SpeechWordInfo(properties); + ExportAgentResponse.create = function create(properties) { + return new ExportAgentResponse(properties); }; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * Encodes the specified ExportAgentResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encode = function encode(message, writer) { + ExportAgentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentUri); + if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.agentContent); + if (message.commitSha != null && Object.hasOwnProperty.call(message, "commitSha")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commitSha); return writer; }; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. + * Encodes the specified ExportAgentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportAgentResponse} message ExportAgentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { + ExportAgentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes an ExportAgentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decode = function decode(reader, length) { + ExportAgentResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.word = reader.string(); - break; - } - case 1: { - message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 1: { + message.agentUri = reader.string(); break; } case 2: { - message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.agentContent = reader.bytes(); break; } - case 4: { - message.confidence = reader.float(); + case 3: { + message.commitSha = reader.string(); break; } default: @@ -87208,164 +90443,161 @@ }; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes an ExportAgentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { + ExportAgentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechWordInfo message. + * Verifies an ExportAgentResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechWordInfo.verify = function verify(message) { + ExportAgentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.word != null && message.hasOwnProperty("word")) - if (!$util.isString(message.word)) - return "word: string expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startOffset); - if (error) - return "startOffset." + error; + var properties = {}; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + properties.agent = 1; + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; } - if (message.endOffset != null && message.hasOwnProperty("endOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endOffset); - if (error) - return "endOffset." + error; + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) + return "agentContent: buffer expected"; + } + if (message.commitSha != null && message.hasOwnProperty("commitSha")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + if (!$util.isString(message.commitSha)) + return "commitSha: string expected"; } - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; return null; }; /** - * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ExportAgentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} ExportAgentResponse */ - SpeechWordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) + ExportAgentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); - if (object.word != null) - message.word = String(object.word); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); - message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); - } - if (object.endOffset != null) { - if (typeof object.endOffset !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); - message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); - } - if (object.confidence != null) - message.confidence = Number(object.confidence); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse(); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); + if (object.agentContent != null) + if (typeof object.agentContent === "string") + $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); + else if (object.agentContent.length >= 0) + message.agentContent = object.agentContent; + if (object.commitSha != null) + message.commitSha = String(object.commitSha); return message; }; /** - * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. + * Creates a plain object from an ExportAgentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo + * @param {google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse} message ExportAgentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechWordInfo.toObject = function toObject(message, options) { + ExportAgentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.startOffset = null; - object.endOffset = null; - object.word = ""; - object.confidence = 0; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + object.agentUri = message.agentUri; + if (options.oneofs) + object.agent = "agentUri"; + } + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; + if (options.oneofs) + object.agent = "agentContent"; + } + if (message.commitSha != null && message.hasOwnProperty("commitSha")) { + object.commitSha = message.commitSha; + if (options.oneofs) + object.agent = "commitSha"; } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); - if (message.word != null && message.hasOwnProperty("word")) - object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this ExportAgentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @instance * @returns {Object.} JSON object */ - SpeechWordInfo.prototype.toJSON = function toJSON() { + ExportAgentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpeechWordInfo + * Gets the default type url for ExportAgentResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportAgentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse"; }; - return SpeechWordInfo; + return ExportAgentResponse; })(); - v3beta1.InputAudioConfig = (function() { + v3beta1.RestoreAgentRequest = (function() { /** - * Properties of an InputAudioConfig. + * Properties of a RestoreAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IInputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo - * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints - * @property {string|null} [model] InputAudioConfig model - * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant - * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @interface IRestoreAgentRequest + * @property {string|null} [name] RestoreAgentRequest name + * @property {string|null} [agentUri] RestoreAgentRequest agentUri + * @property {Uint8Array|null} [agentContent] RestoreAgentRequest agentContent + * @property {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null} [gitSource] RestoreAgentRequest gitSource + * @property {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption|null} [restoreOption] RestoreAgentRequest restoreOption */ /** - * Constructs a new InputAudioConfig. + * Constructs a new RestoreAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig + * @classdesc Represents a RestoreAgentRequest. + * @implements IRestoreAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set */ - function InputAudioConfig(properties) { - this.phraseHints = []; + function RestoreAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87373,162 +90605,145 @@ } /** - * InputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.audioEncoding = 0; + RestoreAgentRequest.prototype.name = ""; /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest agentUri. + * @member {string|null|undefined} agentUri + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.sampleRateHertz = 0; + RestoreAgentRequest.prototype.agentUri = null; /** - * InputAudioConfig enableWordInfo. - * @member {boolean} enableWordInfo - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest agentContent. + * @member {Uint8Array|null|undefined} agentContent + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.enableWordInfo = false; + RestoreAgentRequest.prototype.agentContent = null; /** - * InputAudioConfig phraseHints. - * @member {Array.} phraseHints - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest gitSource. + * @member {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource|null|undefined} gitSource + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.phraseHints = $util.emptyArray; + RestoreAgentRequest.prototype.gitSource = null; /** - * InputAudioConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest restoreOption. + * @member {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption} restoreOption + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.model = ""; + RestoreAgentRequest.prototype.restoreOption = 0; - /** - * InputAudioConfig modelVariant. - * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig - * @instance - */ - InputAudioConfig.prototype.modelVariant = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * InputAudioConfig singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * RestoreAgentRequest agent. + * @member {"agentUri"|"agentContent"|"gitSource"|undefined} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance */ - InputAudioConfig.prototype.singleUtterance = false; + Object.defineProperty(RestoreAgentRequest.prototype, "agent", { + get: $util.oneOfGetter($oneOfFields = ["agentUri", "agentContent", "gitSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new RestoreAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest instance */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); + RestoreAgentRequest.create = function create(properties) { + return new RestoreAgentRequest(properties); }; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified RestoreAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encode = function encode(message, writer) { + RestoreAgentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.phraseHints != null && message.phraseHints.length) - for (var i = 0; i < message.phraseHints.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); - if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); - if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.agentContent != null && Object.hasOwnProperty.call(message, "agentContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.agentContent); + if (message.restoreOption != null && Object.hasOwnProperty.call(message, "restoreOption")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.restoreOption); + if (message.gitSource != null && Object.hasOwnProperty.call(message, "gitSource")) + $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.encode(message.gitSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified RestoreAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRestoreAgentRequest} message RestoreAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + RestoreAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a RestoreAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decode = function decode(reader, length) { + RestoreAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 13: { - message.enableWordInfo = reader.bool(); - break; - } - case 4: { - if (!(message.phraseHints && message.phraseHints.length)) - message.phraseHints = []; - message.phraseHints.push(reader.string()); + message.agentUri = reader.string(); break; } - case 7: { - message.model = reader.string(); + case 3: { + message.agentContent = reader.bytes(); break; } - case 10: { - message.modelVariant = reader.int32(); + case 6: { + message.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.decode(reader, reader.uint32()); break; } - case 8: { - message.singleUtterance = reader.bool(); + case 5: { + message.restoreOption = reader.int32(); break; } default: @@ -87540,281 +90755,425 @@ }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a RestoreAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + RestoreAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputAudioConfig message. + * Verifies a RestoreAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputAudioConfig.verify = function verify(message) { + RestoreAgentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + properties.agent = 1; + if (!$util.isString(message.agentUri)) + return "agentUri: string expected"; + } + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + if (!(message.agentContent && typeof message.agentContent.length === "number" || $util.isString(message.agentContent))) + return "agentContent: buffer expected"; + } + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + if (properties.agent === 1) + return "agent: multiple values"; + properties.agent = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify(message.gitSource); + if (error) + return "gitSource." + error; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - if (typeof message.enableWordInfo !== "boolean") - return "enableWordInfo: boolean expected"; - if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { - if (!Array.isArray(message.phraseHints)) - return "phraseHints: array expected"; - for (var i = 0; i < message.phraseHints.length; ++i) - if (!$util.isString(message.phraseHints[i])) - return "phraseHints: string[] expected"; } - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - switch (message.modelVariant) { + if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) + switch (message.restoreOption) { default: - return "modelVariant: enum value expected"; + return "restoreOption: enum value expected"; case 0: case 1: case 2: - case 3: break; } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; return null; }; /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} RestoreAgentRequest */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) + RestoreAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); - switch (object.audioEncoding) { - default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; - break; - } - break; - case "AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "AUDIO_ENCODING_FLAC": - case 2: - message.audioEncoding = 2; - break; - case "AUDIO_ENCODING_MULAW": - case 3: - message.audioEncoding = 3; - break; - case "AUDIO_ENCODING_AMR": - case 4: - message.audioEncoding = 4; - break; - case "AUDIO_ENCODING_AMR_WB": - case 5: - message.audioEncoding = 5; - break; - case "AUDIO_ENCODING_OGG_OPUS": - case 6: - message.audioEncoding = 6; - break; - case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": - case 7: - message.audioEncoding = 7; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.enableWordInfo != null) - message.enableWordInfo = Boolean(object.enableWordInfo); - if (object.phraseHints) { - if (!Array.isArray(object.phraseHints)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); - message.phraseHints = []; - for (var i = 0; i < object.phraseHints.length; ++i) - message.phraseHints[i] = String(object.phraseHints[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.agentUri != null) + message.agentUri = String(object.agentUri); + if (object.agentContent != null) + if (typeof object.agentContent === "string") + $util.base64.decode(object.agentContent, message.agentContent = $util.newBuffer($util.base64.length(object.agentContent)), 0); + else if (object.agentContent.length >= 0) + message.agentContent = object.agentContent; + if (object.gitSource != null) { + if (typeof object.gitSource !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.gitSource: object expected"); + message.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.fromObject(object.gitSource); } - if (object.model != null) - message.model = String(object.model); - switch (object.modelVariant) { + switch (object.restoreOption) { default: - if (typeof object.modelVariant === "number") { - message.modelVariant = object.modelVariant; + if (typeof object.restoreOption === "number") { + message.restoreOption = object.restoreOption; break; } break; - case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case "RESTORE_OPTION_UNSPECIFIED": case 0: - message.modelVariant = 0; + message.restoreOption = 0; break; - case "USE_BEST_AVAILABLE": + case "KEEP": case 1: - message.modelVariant = 1; + message.restoreOption = 1; break; - case "USE_STANDARD": + case "FALLBACK": case 2: - message.modelVariant = 2; - break; - case "USE_ENHANCED": - case 3: - message.modelVariant = 3; + message.restoreOption = 2; break; } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); return message; }; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a RestoreAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest} message RestoreAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputAudioConfig.toObject = function toObject(message, options) { + RestoreAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phraseHints = []; if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.model = ""; - object.singleUtterance = false; - object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - object.enableWordInfo = false; + object.name = ""; + object.restoreOption = options.enums === String ? "RESTORE_OPTION_UNSPECIFIED" : 0; } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.phraseHints && message.phraseHints.length) { - object.phraseHints = []; - for (var j = 0; j < message.phraseHints.length; ++j) - object.phraseHints[j] = message.phraseHints[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.agentUri != null && message.hasOwnProperty("agentUri")) { + object.agentUri = message.agentUri; + if (options.oneofs) + object.agent = "agentUri"; + } + if (message.agentContent != null && message.hasOwnProperty("agentContent")) { + object.agentContent = options.bytes === String ? $util.base64.encode(message.agentContent, 0, message.agentContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.agentContent) : message.agentContent; + if (options.oneofs) + object.agent = "agentContent"; + } + if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) + object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] === undefined ? message.restoreOption : $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + object.gitSource = $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.toObject(message.gitSource, options); + if (options.oneofs) + object.agent = "gitSource"; } - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) - object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - object.enableWordInfo = message.enableWordInfo; return object; }; /** - * Converts this InputAudioConfig to JSON. + * Converts this RestoreAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @instance * @returns {Object.} JSON object */ - InputAudioConfig.prototype.toJSON = function toJSON() { + RestoreAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InputAudioConfig + * Gets the default type url for RestoreAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.InputAudioConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest"; }; - return InputAudioConfig; - })(); + RestoreAgentRequest.GitSource = (function() { - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender - * @enum {number} - * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value - * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value - * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value - * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value - */ - v3beta1.SsmlVoiceGender = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; - values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; - values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; - return values; + /** + * Properties of a GitSource. + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @interface IGitSource + * @property {string|null} [trackingBranch] GitSource trackingBranch + */ + + /** + * Constructs a new GitSource. + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + * @classdesc Represents a GitSource. + * @implements IGitSource + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource=} [properties] Properties to set + */ + function GitSource(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]]; + } + + /** + * GitSource trackingBranch. + * @member {string} trackingBranch + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @instance + */ + GitSource.prototype.trackingBranch = ""; + + /** + * Creates a new GitSource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource instance + */ + GitSource.create = function create(properties) { + return new GitSource(properties); + }; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trackingBranch != null && Object.hasOwnProperty.call(message, "trackingBranch")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingBranch); + return writer; + }; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trackingBranch = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitSource message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + if (!$util.isString(message.trackingBranch)) + return "trackingBranch: string expected"; + return null; + }; + + /** + * Creates a GitSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} GitSource + */ + GitSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource(); + if (object.trackingBranch != null) + message.trackingBranch = String(object.trackingBranch); + return message; + }; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource} message GitSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.trackingBranch = ""; + if (message.trackingBranch != null && message.hasOwnProperty("trackingBranch")) + object.trackingBranch = message.trackingBranch; + return object; + }; + + /** + * Converts this GitSource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @instance + * @returns {Object.} JSON object + */ + GitSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitSource + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.GitSource"; + }; + + return GitSource; + })(); + + /** + * RestoreOption enum. + * @name google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption + * @enum {number} + * @property {number} RESTORE_OPTION_UNSPECIFIED=0 RESTORE_OPTION_UNSPECIFIED value + * @property {number} KEEP=1 KEEP value + * @property {number} FALLBACK=2 FALLBACK value + */ + RestoreAgentRequest.RestoreOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEEP"] = 1; + values[valuesById[2] = "FALLBACK"] = 2; + return values; + })(); + + return RestoreAgentRequest; })(); - v3beta1.VoiceSelectionParams = (function() { + v3beta1.ValidateAgentRequest = (function() { /** - * Properties of a VoiceSelectionParams. + * Properties of a ValidateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IVoiceSelectionParams - * @property {string|null} [name] VoiceSelectionParams name - * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender + * @interface IValidateAgentRequest + * @property {string|null} [name] ValidateAgentRequest name + * @property {string|null} [languageCode] ValidateAgentRequest languageCode */ /** - * Constructs a new VoiceSelectionParams. + * Constructs a new ValidateAgentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a VoiceSelectionParams. - * @implements IVoiceSelectionParams + * @classdesc Represents a ValidateAgentRequest. + * @implements IValidateAgentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest=} [properties] Properties to set */ - function VoiceSelectionParams(properties) { + function ValidateAgentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87822,80 +91181,80 @@ } /** - * VoiceSelectionParams name. + * ValidateAgentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @instance */ - VoiceSelectionParams.prototype.name = ""; + ValidateAgentRequest.prototype.name = ""; /** - * VoiceSelectionParams ssmlGender. - * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * ValidateAgentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @instance */ - VoiceSelectionParams.prototype.ssmlGender = 0; + ValidateAgentRequest.prototype.languageCode = ""; /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new ValidateAgentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest instance */ - VoiceSelectionParams.create = function create(properties) { - return new VoiceSelectionParams(properties); + ValidateAgentRequest.create = function create(properties) { + return new ValidateAgentRequest(properties); }; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified ValidateAgentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} message ValidateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encode = function encode(message, writer) { + ValidateAgentRequest.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.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified ValidateAgentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateAgentRequest} message ValidateAgentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { + ValidateAgentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a ValidateAgentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decode = function decode(reader, length) { + ValidateAgentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -87904,7 +91263,7 @@ break; } case 2: { - message.ssmlGender = reader.int32(); + message.languageCode = reader.string(); break; } default: @@ -87916,165 +91275,132 @@ }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a ValidateAgentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { + ValidateAgentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VoiceSelectionParams message. + * Verifies a ValidateAgentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VoiceSelectionParams.verify = function verify(message) { + ValidateAgentRequest.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.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - switch (message.ssmlGender) { - default: - return "ssmlGender: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateAgentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} ValidateAgentRequest */ - VoiceSelectionParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) + ValidateAgentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest(); if (object.name != null) message.name = String(object.name); - switch (object.ssmlGender) { - default: - if (typeof object.ssmlGender === "number") { - message.ssmlGender = object.ssmlGender; - break; - } - break; - case "SSML_VOICE_GENDER_UNSPECIFIED": - case 0: - message.ssmlGender = 0; - break; - case "SSML_VOICE_GENDER_MALE": - case 1: - message.ssmlGender = 1; - break; - case "SSML_VOICE_GENDER_FEMALE": - case 2: - message.ssmlGender = 2; - break; - case "SSML_VOICE_GENDER_NEUTRAL": - case 3: - message.ssmlGender = 3; - break; - } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * Creates a plain object from a ValidateAgentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams + * @param {google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest} message ValidateAgentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceSelectionParams.toObject = function toObject(message, options) { + ValidateAgentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; + object.languageCode = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) - object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this ValidateAgentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @instance * @returns {Object.} JSON object */ - VoiceSelectionParams.prototype.toJSON = function toJSON() { + ValidateAgentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VoiceSelectionParams + * Gets the default type url for ValidateAgentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidateAgentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest"; }; - return VoiceSelectionParams; + return ValidateAgentRequest; })(); - v3beta1.SynthesizeSpeechConfig = (function() { + v3beta1.GetAgentValidationResultRequest = (function() { /** - * Properties of a SynthesizeSpeechConfig. + * Properties of a GetAgentValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISynthesizeSpeechConfig - * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate - * @property {number|null} [pitch] SynthesizeSpeechConfig pitch - * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb - * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId - * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice + * @interface IGetAgentValidationResultRequest + * @property {string|null} [name] GetAgentValidationResultRequest name + * @property {string|null} [languageCode] GetAgentValidationResultRequest languageCode */ /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new GetAgentValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SynthesizeSpeechConfig. - * @implements ISynthesizeSpeechConfig + * @classdesc Represents a GetAgentValidationResultRequest. + * @implements IGetAgentValidationResultRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest=} [properties] Properties to set */ - function SynthesizeSpeechConfig(properties) { - this.effectsProfileId = []; + function GetAgentValidationResultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88082,134 +91408,89 @@ } /** - * SynthesizeSpeechConfig speakingRate. - * @member {number} speakingRate - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * GetAgentValidationResultRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @instance */ - SynthesizeSpeechConfig.prototype.speakingRate = 0; + GetAgentValidationResultRequest.prototype.name = ""; /** - * SynthesizeSpeechConfig pitch. - * @member {number} pitch - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * GetAgentValidationResultRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @instance */ - SynthesizeSpeechConfig.prototype.pitch = 0; + GetAgentValidationResultRequest.prototype.languageCode = ""; /** - * SynthesizeSpeechConfig volumeGainDb. - * @member {number} volumeGainDb - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig - * @instance + * Creates a new GetAgentValidationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest instance */ - SynthesizeSpeechConfig.prototype.volumeGainDb = 0; - - /** - * SynthesizeSpeechConfig effectsProfileId. - * @member {Array.} effectsProfileId - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig - * @instance - */ - SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; - - /** - * SynthesizeSpeechConfig voice. - * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig - * @instance - */ - SynthesizeSpeechConfig.prototype.voice = null; - - /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance - */ - SynthesizeSpeechConfig.create = function create(properties) { - return new SynthesizeSpeechConfig(properties); + GetAgentValidationResultRequest.create = function create(properties) { + return new GetAgentValidationResultRequest(properties); }; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified GetAgentValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} message GetAgentValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encode = function encode(message, writer) { + GetAgentValidationResultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); - if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); - if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); - if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) - $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.effectsProfileId != null && message.effectsProfileId.length) - for (var i = 0; i < message.effectsProfileId.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); + 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 SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified GetAgentValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetAgentValidationResultRequest} message GetAgentValidationResultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + GetAgentValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decode = function decode(reader, length) { + GetAgentValidationResultRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.speakingRate = reader.double(); + message.name = reader.string(); break; } case 2: { - message.pitch = reader.double(); - break; - } - case 3: { - message.volumeGainDb = reader.double(); - break; - } - case 5: { - if (!(message.effectsProfileId && message.effectsProfileId.length)) - message.effectsProfileId = []; - message.effectsProfileId.push(reader.string()); - break; - } - case 4: { - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; } default: @@ -88221,197 +91502,133 @@ }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a GetAgentValidationResultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { + GetAgentValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a GetAgentValidationResultRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SynthesizeSpeechConfig.verify = function verify(message) { + GetAgentValidationResultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - if (typeof message.speakingRate !== "number") - return "speakingRate: number expected"; - if (message.pitch != null && message.hasOwnProperty("pitch")) - if (typeof message.pitch !== "number") - return "pitch: number expected"; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - if (typeof message.volumeGainDb !== "number") - return "volumeGainDb: number expected"; - if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { - if (!Array.isArray(message.effectsProfileId)) - return "effectsProfileId: array expected"; - for (var i = 0; i < message.effectsProfileId.length; ++i) - if (!$util.isString(message.effectsProfileId[i])) - return "effectsProfileId: string[] expected"; - } - if (message.voice != null && message.hasOwnProperty("voice")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); - if (error) - return "voice." + 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 SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetAgentValidationResultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} GetAgentValidationResultRequest */ - SynthesizeSpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) + GetAgentValidationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); - if (object.speakingRate != null) - message.speakingRate = Number(object.speakingRate); - if (object.pitch != null) - message.pitch = Number(object.pitch); - if (object.volumeGainDb != null) - message.volumeGainDb = Number(object.volumeGainDb); - if (object.effectsProfileId) { - if (!Array.isArray(object.effectsProfileId)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); - message.effectsProfileId = []; - for (var i = 0; i < object.effectsProfileId.length; ++i) - message.effectsProfileId[i] = String(object.effectsProfileId[i]); - } - if (object.voice != null) { - if (typeof object.voice !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); - message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest(); + 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 SynthesizeSpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from a GetAgentValidationResultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest} message GetAgentValidationResultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SynthesizeSpeechConfig.toObject = function toObject(message, options) { + GetAgentValidationResultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.effectsProfileId = []; if (options.defaults) { - object.speakingRate = 0; - object.pitch = 0; - object.volumeGainDb = 0; - object.voice = null; - } - if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) - object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; - if (message.pitch != null && message.hasOwnProperty("pitch")) - object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; - if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) - object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; - if (message.voice != null && message.hasOwnProperty("voice")) - object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); - if (message.effectsProfileId && message.effectsProfileId.length) { - object.effectsProfileId = []; - for (var j = 0; j < message.effectsProfileId.length; ++j) - object.effectsProfileId[j] = message.effectsProfileId[j]; + 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 SynthesizeSpeechConfig to JSON. + * Converts this GetAgentValidationResultRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @instance * @returns {Object.} JSON object */ - SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + GetAgentValidationResultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SynthesizeSpeechConfig + * Gets the default type url for GetAgentValidationResultRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAgentValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest"; }; - return SynthesizeSpeechConfig; - })(); - - /** - * OutputAudioEncoding enum. - * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding - * @enum {number} - * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value - * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value - * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value - * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value - * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value - */ - v3beta1.OutputAudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; - values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; - values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; - values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; - return values; + return GetAgentValidationResultRequest; })(); - v3beta1.OutputAudioConfig = (function() { + v3beta1.AgentValidationResult = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of an AgentValidationResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IOutputAudioConfig - * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz - * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig + * @interface IAgentValidationResult + * @property {string|null} [name] AgentValidationResult name + * @property {Array.|null} [flowValidationResults] AgentValidationResult flowValidationResults */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new AgentValidationResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents an AgentValidationResult. + * @implements IAgentValidationResult * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function AgentValidationResult(properties) { + this.flowValidationResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88419,103 +91636,92 @@ } /** - * OutputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig - * @instance - */ - OutputAudioConfig.prototype.audioEncoding = 0; - - /** - * OutputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * AgentValidationResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @instance */ - OutputAudioConfig.prototype.sampleRateHertz = 0; + AgentValidationResult.prototype.name = ""; /** - * OutputAudioConfig synthesizeSpeechConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * AgentValidationResult flowValidationResults. + * @member {Array.} flowValidationResults + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @instance */ - OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + AgentValidationResult.prototype.flowValidationResults = $util.emptyArray; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new AgentValidationResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + AgentValidationResult.create = function create(properties) { + return new AgentValidationResult(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified AgentValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult} message AgentValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + AgentValidationResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); - if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) - $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.flowValidationResults != null && message.flowValidationResults.length) + for (var i = 0; i < message.flowValidationResults.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.encode(message.flowValidationResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified AgentValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IAgentValidationResult} message AgentValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + AgentValidationResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes an AgentValidationResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decode = function decode(reader, length) { + AgentValidationResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioEncoding = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.sampleRateHertz = reader.int32(); - break; - } - case 3: { - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + if (!(message.flowValidationResults && message.flowValidationResults.length)) + message.flowValidationResults = []; + message.flowValidationResults.push($root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.decode(reader, reader.uint32())); break; } default: @@ -88527,184 +91733,149 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes an AgentValidationResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { + AgentValidationResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies an AgentValidationResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudioConfig.verify = function verify(message) { + AgentValidationResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { - default: - return "audioEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 3: - case 5: - break; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.flowValidationResults != null && message.hasOwnProperty("flowValidationResults")) { + if (!Array.isArray(message.flowValidationResults)) + return "flowValidationResults: array expected"; + for (var i = 0; i < message.flowValidationResults.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify(message.flowValidationResults[i]); + if (error) + return "flowValidationResults." + error; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - if (!$util.isInteger(message.sampleRateHertz)) - return "sampleRateHertz: integer expected"; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); - if (error) - return "synthesizeSpeechConfig." + error; } return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AgentValidationResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} AgentValidationResult */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) + AgentValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); - switch (object.audioEncoding) { - default: - if (typeof object.audioEncoding === "number") { - message.audioEncoding = object.audioEncoding; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult(); + if (object.name != null) + message.name = String(object.name); + if (object.flowValidationResults) { + if (!Array.isArray(object.flowValidationResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.flowValidationResults: array expected"); + message.flowValidationResults = []; + for (var i = 0; i < object.flowValidationResults.length; ++i) { + if (typeof object.flowValidationResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.flowValidationResults: object expected"); + message.flowValidationResults[i] = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.fromObject(object.flowValidationResults[i]); } - break; - case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.audioEncoding = 0; - break; - case "OUTPUT_AUDIO_ENCODING_LINEAR_16": - case 1: - message.audioEncoding = 1; - break; - case "OUTPUT_AUDIO_ENCODING_MP3": - case 2: - message.audioEncoding = 2; - break; - case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": - case 4: - message.audioEncoding = 4; - break; - case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": - case 3: - message.audioEncoding = 3; - break; - case "OUTPUT_AUDIO_ENCODING_MULAW": - case 5: - message.audioEncoding = 5; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.synthesizeSpeechConfig != null) { - if (typeof object.synthesizeSpeechConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); } return message; }; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from an AgentValidationResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig + * @param {google.cloud.dialogflow.cx.v3beta1.AgentValidationResult} message AgentValidationResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudioConfig.toObject = function toObject(message, options) { + AgentValidationResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.synthesizeSpeechConfig = null; + if (options.arrays || options.defaults) + object.flowValidationResults = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.flowValidationResults && message.flowValidationResults.length) { + object.flowValidationResults = []; + for (var j = 0; j < message.flowValidationResults.length; ++j) + object.flowValidationResults[j] = $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.toObject(message.flowValidationResults[j], options); } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) - object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); return object; }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this AgentValidationResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @instance * @returns {Object.} JSON object */ - OutputAudioConfig.prototype.toJSON = function toJSON() { + AgentValidationResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OutputAudioConfig + * Gets the default type url for AgentValidationResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.AgentValidationResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AgentValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.AgentValidationResult"; }; - return OutputAudioConfig; + return AgentValidationResult; })(); - v3beta1.TextToSpeechSettings = (function() { + v3beta1.GetGenerativeSettingsRequest = (function() { /** - * Properties of a TextToSpeechSettings. + * Properties of a GetGenerativeSettingsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITextToSpeechSettings - * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs + * @interface IGetGenerativeSettingsRequest + * @property {string|null} [name] GetGenerativeSettingsRequest name + * @property {string|null} [languageCode] GetGenerativeSettingsRequest languageCode */ /** - * Constructs a new TextToSpeechSettings. + * Constructs a new GetGenerativeSettingsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TextToSpeechSettings. - * @implements ITextToSpeechSettings + * @classdesc Represents a GetGenerativeSettingsRequest. + * @implements IGetGenerativeSettingsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest=} [properties] Properties to set */ - function TextToSpeechSettings(properties) { - this.synthesizeSpeechConfigs = {}; + function GetGenerativeSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88712,97 +91883,89 @@ } /** - * TextToSpeechSettings synthesizeSpeechConfigs. - * @member {Object.} synthesizeSpeechConfigs - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * GetGenerativeSettingsRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @instance */ - TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; + GetGenerativeSettingsRequest.prototype.name = ""; /** - * Creates a new TextToSpeechSettings instance using the specified properties. + * GetGenerativeSettingsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest + * @instance + */ + GetGenerativeSettingsRequest.prototype.languageCode = ""; + + /** + * Creates a new GetGenerativeSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest instance */ - TextToSpeechSettings.create = function create(properties) { - return new TextToSpeechSettings(properties); + GetGenerativeSettingsRequest.create = function create(properties) { + return new GetGenerativeSettingsRequest(properties); }; /** - * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * Encodes the specified GetGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} message GetGenerativeSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextToSpeechSettings.encode = function encode(message, writer) { + GetGenerativeSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) - for (var keys = Object.keys(message.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().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 TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. + * Encodes the specified GetGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGenerativeSettingsRequest} message GetGenerativeSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { + GetGenerativeSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer. + * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextToSpeechSettings.decode = function decode(reader, length) { + GetGenerativeSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.synthesizeSpeechConfigs === $util.emptyObject) - message.synthesizeSpeechConfigs = {}; - 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.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.synthesizeSpeechConfigs[key] = value; + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); break; } default: @@ -88814,508 +91977,415 @@ }; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. + * Decodes a GetGenerativeSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { + GetGenerativeSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextToSpeechSettings message. + * Verifies a GetGenerativeSettingsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextToSpeechSettings.verify = function verify(message) { + GetGenerativeSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { - if (!$util.isObject(message.synthesizeSpeechConfigs)) - return "synthesizeSpeechConfigs: object expected"; - var key = Object.keys(message.synthesizeSpeechConfigs); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); - if (error) - return "synthesizeSpeechConfigs." + 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 TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} GetGenerativeSettingsRequest */ - TextToSpeechSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings) + GetGenerativeSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings(); - if (object.synthesizeSpeechConfigs) { - if (typeof object.synthesizeSpeechConfigs !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); - message.synthesizeSpeechConfigs = {}; - for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { - if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); - message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest(); + 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 TextToSpeechSettings message. Also converts values to other types if specified. + * Creates a plain object from a GetGenerativeSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} message TextToSpeechSettings + * @param {google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest} message GetGenerativeSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextToSpeechSettings.toObject = function toObject(message, options) { + GetGenerativeSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.synthesizeSpeechConfigs = {}; - var keys2; - if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { - object.synthesizeSpeechConfigs = {}; - for (var j = 0; j < keys2.length; ++j) - object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], options); + 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 TextToSpeechSettings to JSON. + * Converts this GetGenerativeSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @instance * @returns {Object.} JSON object */ - TextToSpeechSettings.prototype.toJSON = function toJSON() { + GetGenerativeSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TextToSpeechSettings + * Gets the default type url for GetGenerativeSettingsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TextToSpeechSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetGenerativeSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetGenerativeSettingsRequest"; }; - return TextToSpeechSettings; + return GetGenerativeSettingsRequest; })(); - v3beta1.Flows = (function() { + v3beta1.UpdateGenerativeSettingsRequest = (function() { /** - * Constructs a new Flows service. + * Properties of an UpdateGenerativeSettingsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flows - * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; - - /** - * Creates new Flows service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. + * @interface IUpdateGenerativeSettingsRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null} [generativeSettings] UpdateGenerativeSettingsRequest generativeSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGenerativeSettingsRequest updateMask */ - Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef CreateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + * Constructs a new UpdateGenerativeSettingsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateGenerativeSettingsRequest. + * @implements IUpdateGenerativeSettingsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest=} [properties] Properties to set */ + function UpdateGenerativeSettingsRequest(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 CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * UpdateGenerativeSettingsRequest generativeSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings|null|undefined} generativeSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { - return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "CreateFlow" }); + UpdateGenerativeSettingsRequest.prototype.generativeSettings = null; /** - * Calls CreateFlow. - * @function createFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * UpdateGenerativeSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateGenerativeSettingsRequest.prototype.updateMask = null; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef DeleteFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new UpdateGenerativeSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest instance */ + UpdateGenerativeSettingsRequest.create = function create(properties) { + return new UpdateGenerativeSettingsRequest(properties); + }; /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateGenerativeSettingsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { - return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFlow" }); + UpdateGenerativeSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generativeSettings != null && Object.hasOwnProperty.call(message, "generativeSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.encode(message.generativeSettings, 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; + }; /** - * Calls DeleteFlow. - * @function deleteFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateGenerativeSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateGenerativeSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ListFlowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse + * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateGenerativeSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.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; + }; /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse - * @returns {undefined} - * @variation 1 + * Decodes an UpdateGenerativeSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { - return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); - }, "name", { value: "ListFlows" }); + UpdateGenerativeSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListFlows. - * @function listFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an UpdateGenerativeSettingsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + UpdateGenerativeSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.generativeSettings != null && message.hasOwnProperty("generativeSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify(message.generativeSettings); + if (error) + return "generativeSettings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef GetFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + * Creates an UpdateGenerativeSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} UpdateGenerativeSettingsRequest */ + UpdateGenerativeSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest(); + if (object.generativeSettings != null) { + if (typeof object.generativeSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.generativeSettings: object expected"); + message.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.fromObject(object.generativeSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 + * Creates a plain object from an UpdateGenerativeSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest} message UpdateGenerativeSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { - return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "GetFlow" }); + UpdateGenerativeSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.generativeSettings = null; + object.updateMask = null; + } + if (message.generativeSettings != null && message.hasOwnProperty("generativeSettings")) + object.generativeSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.toObject(message.generativeSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; /** - * Calls GetFlow. - * @function getFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * Converts this UpdateGenerativeSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef UpdateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + * @returns {Object.} JSON object */ + UpdateGenerativeSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow - * @returns {undefined} - * @variation 1 + * Gets the default type url for UpdateGenerativeSettingsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { - return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); - }, "name", { value: "UpdateFlow" }); + UpdateGenerativeSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateGenerativeSettingsRequest"; + }; - /** - * Calls UpdateFlow. - * @function updateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return UpdateGenerativeSettingsRequest; + })(); - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef TrainFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { - return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TrainFlow" }); - - /** - * Calls TrainFlow. - * @function trainFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ValidateFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { - return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); - }, "name", { value: "ValidateFlow" }); - - /** - * Calls ValidateFlow. - * @function validateFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef GetFlowValidationResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult - */ - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { - return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); - }, "name", { value: "GetFlowValidationResult" }); - - /** - * Calls GetFlowValidationResult. - * @function getFlowValidationResult - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ImportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { - return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportFlow" }); - - /** - * Calls ImportFlow. - * @function importFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @typedef ExportFlowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { - return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportFlow" }); - - /** - * Calls ExportFlow. - * @function exportFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Flows - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.AudioEncoding + * @enum {number} + * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value + * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value + * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value + * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value + * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value + * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value + * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value + * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value + */ + v3beta1.AudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; + values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; + values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; + values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; + values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; + values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; + return values; + })(); - return Flows; + /** + * SpeechModelVariant enum. + * @name google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant + * @enum {number} + * @property {number} SPEECH_MODEL_VARIANT_UNSPECIFIED=0 SPEECH_MODEL_VARIANT_UNSPECIFIED value + * @property {number} USE_BEST_AVAILABLE=1 USE_BEST_AVAILABLE value + * @property {number} USE_STANDARD=2 USE_STANDARD value + * @property {number} USE_ENHANCED=3 USE_ENHANCED value + */ + v3beta1.SpeechModelVariant = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPEECH_MODEL_VARIANT_UNSPECIFIED"] = 0; + values[valuesById[1] = "USE_BEST_AVAILABLE"] = 1; + values[valuesById[2] = "USE_STANDARD"] = 2; + values[valuesById[3] = "USE_ENHANCED"] = 3; + return values; })(); - v3beta1.NluSettings = (function() { + v3beta1.SpeechWordInfo = (function() { /** - * Properties of a NluSettings. + * Properties of a SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface INluSettings - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType - * @property {number|null} [classificationThreshold] NluSettings classificationThreshold - * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + * @interface ISpeechWordInfo + * @property {string|null} [word] SpeechWordInfo word + * @property {google.protobuf.IDuration|null} [startOffset] SpeechWordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] SpeechWordInfo endOffset + * @property {number|null} [confidence] SpeechWordInfo confidence */ /** - * Constructs a new NluSettings. + * Constructs a new SpeechWordInfo. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a NluSettings. - * @implements INluSettings + * @classdesc Represents a SpeechWordInfo. + * @implements ISpeechWordInfo * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set */ - function NluSettings(properties) { + function SpeechWordInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89323,103 +92393,117 @@ } /** - * NluSettings modelType. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo word. + * @member {string} word + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.modelType = 0; + SpeechWordInfo.prototype.word = ""; /** - * NluSettings classificationThreshold. - * @member {number} classificationThreshold - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.classificationThreshold = 0; + SpeechWordInfo.prototype.startOffset = null; /** - * NluSettings modelTrainingMode. - * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * SpeechWordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance */ - NluSettings.prototype.modelTrainingMode = 0; + SpeechWordInfo.prototype.endOffset = null; /** - * Creates a new NluSettings instance using the specified properties. + * SpeechWordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + * @instance + */ + SpeechWordInfo.prototype.confidence = 0; + + /** + * Creates a new SpeechWordInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo instance */ - NluSettings.create = function create(properties) { - return new NluSettings(properties); + SpeechWordInfo.create = function create(properties) { + return new SpeechWordInfo(properties); }; /** - * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encode = function encode(message, writer) { + SpeechWordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); - if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); - if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); return writer; }; /** - * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NluSettings.encodeDelimited = function encodeDelimited(message, writer) { + SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NluSettings message from the specified reader or buffer. + * Decodes a SpeechWordInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decode = function decode(reader, length) { + SpeechWordInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: { + message.word = reader.string(); + break; + } case 1: { - message.modelType = reader.int32(); + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 3: { - message.classificationThreshold = reader.float(); + case 2: { + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 4: { - message.modelTrainingMode = reader.int32(); + message.confidence = reader.float(); break; } default: @@ -89431,230 +92515,158 @@ }; /** - * Decodes a NluSettings message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NluSettings.decodeDelimited = function decodeDelimited(reader) { + SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NluSettings message. + * Verifies a SpeechWordInfo message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NluSettings.verify = function verify(message) { + SpeechWordInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.modelType != null && message.hasOwnProperty("modelType")) - switch (message.modelType) { - default: - return "modelType: enum value expected"; - case 0: - case 1: - case 3: - break; - } - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - if (typeof message.classificationThreshold !== "number") - return "classificationThreshold: number expected"; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - switch (message.modelTrainingMode) { - default: - return "modelTrainingMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startOffset); + if (error) + return "startOffset." + error; + } + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} SpeechWordInfo */ - NluSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) + SpeechWordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); - switch (object.modelType) { - default: - if (typeof object.modelType === "number") { - message.modelType = object.modelType; - break; - } - break; - case "MODEL_TYPE_UNSPECIFIED": - case 0: - message.modelType = 0; - break; - case "MODEL_TYPE_STANDARD": - case 1: - message.modelType = 1; - break; - case "MODEL_TYPE_ADVANCED": - case 3: - message.modelType = 3; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo(); + if (object.word != null) + message.word = String(object.word); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); } - if (object.classificationThreshold != null) - message.classificationThreshold = Number(object.classificationThreshold); - switch (object.modelTrainingMode) { - default: - if (typeof object.modelTrainingMode === "number") { - message.modelTrainingMode = object.modelTrainingMode; - break; - } - break; - case "MODEL_TRAINING_MODE_UNSPECIFIED": - case 0: - message.modelTrainingMode = 0; - break; - case "MODEL_TRAINING_MODE_AUTOMATIC": - case 1: - message.modelTrainingMode = 1; - break; - case "MODEL_TRAINING_MODE_MANUAL": - case 2: - message.modelTrainingMode = 2; - break; + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); } + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a NluSettings message. Also converts values to other types if specified. + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings + * @param {google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo} message SpeechWordInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NluSettings.toObject = function toObject(message, options) { + SpeechWordInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - object.classificationThreshold = 0; - object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; } - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; - if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) - object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; - if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) + object.word = message.word; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this NluSettings to JSON. + * Converts this SpeechWordInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @instance * @returns {Object.} JSON object */ - NluSettings.prototype.toJSON = function toJSON() { + SpeechWordInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NluSettings + * Gets the default type url for SpeechWordInfo * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpeechWordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.NluSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo"; }; - /** - * ModelType enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value - * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value - */ - NluSettings.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; - values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; - return values; - })(); - - /** - * ModelTrainingMode enum. - * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode - * @enum {number} - * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value - * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value - * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value - */ - NluSettings.ModelTrainingMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; - values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; - return values; - })(); - - return NluSettings; + return SpeechWordInfo; })(); - v3beta1.Flow = (function() { + v3beta1.BargeInConfig = (function() { /** - * Properties of a Flow. + * Properties of a BargeInConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlow - * @property {string|null} [name] Flow name - * @property {string|null} [displayName] Flow displayName - * @property {string|null} [description] Flow description - * @property {Array.|null} [transitionRoutes] Flow transitionRoutes - * @property {Array.|null} [eventHandlers] Flow eventHandlers - * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups - * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings - * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Flow advancedSettings - * @property {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] Flow knowledgeConnectorSettings + * @interface IBargeInConfig + * @property {google.protobuf.IDuration|null} [noBargeInDuration] BargeInConfig noBargeInDuration + * @property {google.protobuf.IDuration|null} [totalDuration] BargeInConfig totalDuration */ /** - * Constructs a new Flow. + * Constructs a new BargeInConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Flow. - * @implements IFlow + * @classdesc Represents a BargeInConfig. + * @implements IBargeInConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig=} [properties] Properties to set */ - function Flow(properties) { - this.transitionRoutes = []; - this.eventHandlers = []; - this.transitionRouteGroups = []; + function BargeInConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89662,196 +92674,89 @@ } /** - * Flow name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.name = ""; - - /** - * Flow displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.displayName = ""; - - /** - * Flow description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.description = ""; - - /** - * Flow transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.transitionRoutes = $util.emptyArray; - - /** - * Flow eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.eventHandlers = $util.emptyArray; - - /** - * Flow transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.transitionRouteGroups = $util.emptyArray; - - /** - * Flow nluSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow - * @instance - */ - Flow.prototype.nluSettings = null; - - /** - * Flow advancedSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * BargeInConfig noBargeInDuration. + * @member {google.protobuf.IDuration|null|undefined} noBargeInDuration + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @instance */ - Flow.prototype.advancedSettings = null; + BargeInConfig.prototype.noBargeInDuration = null; /** - * Flow knowledgeConnectorSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * BargeInConfig totalDuration. + * @member {google.protobuf.IDuration|null|undefined} totalDuration + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @instance */ - Flow.prototype.knowledgeConnectorSettings = null; + BargeInConfig.prototype.totalDuration = null; /** - * Creates a new Flow instance using the specified properties. + * Creates a new BargeInConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.BargeInConfig} BargeInConfig instance */ - Flow.create = function create(properties) { - return new Flow(properties); + BargeInConfig.create = function create(properties) { + return new BargeInConfig(properties); }; /** - * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * Encodes the specified BargeInConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BargeInConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig} message BargeInConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encode = function encode(message, writer) { + BargeInConfig.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.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - 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.v3beta1.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.noBargeInDuration != null && Object.hasOwnProperty.call(message, "noBargeInDuration")) + $root.google.protobuf.Duration.encode(message.noBargeInDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.totalDuration != null && Object.hasOwnProperty.call(message, "totalDuration")) + $root.google.protobuf.Duration.encode(message.totalDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. + * Encodes the specified BargeInConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BargeInConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig} message BargeInConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Flow.encodeDelimited = function encodeDelimited(message, writer) { + BargeInConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Flow message from the specified reader or buffer. + * Decodes a BargeInConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.BargeInConfig} BargeInConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decode = function decode(reader, length) { + BargeInConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.noBargeInDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - } - case 15: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); - break; - } - case 11: { - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); - break; - } - case 14: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); - break; - } - case 18: { - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.decode(reader, reader.uint32()); + message.totalDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -89863,252 +92768,149 @@ }; /** - * Decodes a Flow message from the specified reader or buffer, length delimited. + * Decodes a BargeInConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.BargeInConfig} BargeInConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Flow.decodeDelimited = function decodeDelimited(reader) { + BargeInConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Flow message. + * Verifies a BargeInConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Flow.verify = function verify(message) { + BargeInConfig.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.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.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } - } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); - if (error) - return "eventHandlers." + error; - } - } - 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) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: string[] expected"; - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); - if (error) - return "nluSettings." + error; - } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) { + var error = $root.google.protobuf.Duration.verify(message.noBargeInDuration); if (error) - return "advancedSettings." + error; + return "noBargeInDuration." + error; } - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) { + var error = $root.google.protobuf.Duration.verify(message.totalDuration); if (error) - return "knowledgeConnectorSettings." + error; + return "totalDuration." + error; } return null; }; /** - * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * Creates a BargeInConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + * @returns {google.cloud.dialogflow.cx.v3beta1.BargeInConfig} BargeInConfig */ - Flow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) + BargeInConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); - 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.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.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.v3beta1.Flow.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); - } - } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); - } - if (object.nluSettings != null) { - if (typeof object.nluSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); - message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); - } - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig(); + if (object.noBargeInDuration != null) { + if (typeof object.noBargeInDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.BargeInConfig.noBargeInDuration: object expected"); + message.noBargeInDuration = $root.google.protobuf.Duration.fromObject(object.noBargeInDuration); } - if (object.knowledgeConnectorSettings != null) { - if (typeof object.knowledgeConnectorSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.knowledgeConnectorSettings: object expected"); - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); + if (object.totalDuration != null) { + if (typeof object.totalDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.BargeInConfig.totalDuration: object expected"); + message.totalDuration = $root.google.protobuf.Duration.fromObject(object.totalDuration); } return message; }; /** - * Creates a plain object from a Flow message. Also converts values to other types if specified. + * Creates a plain object from a BargeInConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow + * @param {google.cloud.dialogflow.cx.v3beta1.BargeInConfig} message BargeInConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Flow.toObject = function toObject(message, options) { + BargeInConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.nluSettings = null; - object.advancedSettings = null; - object.knowledgeConnectorSettings = 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.transitionRoutes && message.transitionRoutes.length) { - object.transitionRoutes = []; - for (var j = 0; j < message.transitionRoutes.length; ++j) - object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); - } - if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) - object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + object.noBargeInDuration = null; + object.totalDuration = null; } - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) - object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + if (message.noBargeInDuration != null && message.hasOwnProperty("noBargeInDuration")) + object.noBargeInDuration = $root.google.protobuf.Duration.toObject(message.noBargeInDuration, options); + if (message.totalDuration != null && message.hasOwnProperty("totalDuration")) + object.totalDuration = $root.google.protobuf.Duration.toObject(message.totalDuration, options); return object; }; /** - * Converts this Flow to JSON. + * Converts this BargeInConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @instance * @returns {Object.} JSON object */ - Flow.prototype.toJSON = function toJSON() { + BargeInConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Flow + * Gets the default type url for BargeInConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @memberof google.cloud.dialogflow.cx.v3beta1.BargeInConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BargeInConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Flow"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.BargeInConfig"; }; - return Flow; + return BargeInConfig; })(); - v3beta1.CreateFlowRequest = (function() { + v3beta1.InputAudioConfig = (function() { /** - * Properties of a CreateFlowRequest. + * Properties of an InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateFlowRequest - * @property {string|null} [parent] CreateFlowRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow - * @property {string|null} [languageCode] CreateFlowRequest languageCode + * @interface IInputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo + * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints + * @property {string|null} [model] InputAudioConfig model + * @property {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant + * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @property {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig|null} [bargeInConfig] InputAudioConfig bargeInConfig */ /** - * Constructs a new CreateFlowRequest. + * Constructs a new InputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateFlowRequest. - * @implements ICreateFlowRequest + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set */ - function CreateFlowRequest(properties) { + function InputAudioConfig(properties) { + this.phraseHints = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90116,103 +92918,176 @@ } /** - * CreateFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * InputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.AudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - CreateFlowRequest.prototype.parent = ""; + InputAudioConfig.prototype.audioEncoding = 0; /** - * CreateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * InputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - CreateFlowRequest.prototype.flow = null; + InputAudioConfig.prototype.sampleRateHertz = 0; /** - * CreateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * InputAudioConfig enableWordInfo. + * @member {boolean} enableWordInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance */ - CreateFlowRequest.prototype.languageCode = ""; + InputAudioConfig.prototype.enableWordInfo = false; /** - * Creates a new CreateFlowRequest instance using the specified properties. + * InputAudioConfig phraseHints. + * @member {Array.} phraseHints + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.phraseHints = $util.emptyArray; + + /** + * InputAudioConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.model = ""; + + /** + * InputAudioConfig modelVariant. + * @member {google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant} modelVariant + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.modelVariant = 0; + + /** + * InputAudioConfig singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.singleUtterance = false; + + /** + * InputAudioConfig bargeInConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.IBargeInConfig|null|undefined} bargeInConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.bargeInConfig = null; + + /** + * Creates a new InputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig instance */ - CreateFlowRequest.create = function create(properties) { - return new CreateFlowRequest(properties); + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); }; /** - * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encode = function encode(message, writer) { + InputAudioConfig.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.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, 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.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.phraseHints != null && message.phraseHints.length) + for (var i = 0; i < message.phraseHints.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseHints[i]); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.model); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.singleUtterance); + if (message.modelVariant != null && Object.hasOwnProperty.call(message, "modelVariant")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.modelVariant); + if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.bargeInConfig != null && Object.hasOwnProperty.call(message, "bargeInConfig")) + $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.encode(message.bargeInConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decode = function decode(reader, length) { + InputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.audioEncoding = reader.int32(); break; } case 2: { - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + message.sampleRateHertz = reader.int32(); break; } - case 3: { - message.languageCode = reader.string(); + case 13: { + message.enableWordInfo = reader.bool(); + break; + } + case 4: { + if (!(message.phraseHints && message.phraseHints.length)) + message.phraseHints = []; + message.phraseHints.push(reader.string()); + break; + } + case 7: { + message.model = reader.string(); + break; + } + case 10: { + message.modelVariant = reader.int32(); + break; + } + case 8: { + message.singleUtterance = reader.bool(); + break; + } + case 15: { + message.bargeInConfig = $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.decode(reader, reader.uint32()); break; } default: @@ -90224,145 +93099,294 @@ }; /** - * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFlowRequest message. + * Verifies an InputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFlowRequest.verify = function verify(message) { + InputAudioConfig.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.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + if (typeof message.enableWordInfo !== "boolean") + return "enableWordInfo: boolean expected"; + if (message.phraseHints != null && message.hasOwnProperty("phraseHints")) { + if (!Array.isArray(message.phraseHints)) + return "phraseHints: array expected"; + for (var i = 0; i < message.phraseHints.length; ++i) + if (!$util.isString(message.phraseHints[i])) + return "phraseHints: string[] expected"; + } + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + switch (message.modelVariant) { + default: + return "modelVariant: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.verify(message.bargeInConfig); if (error) - return "flow." + error; + return "bargeInConfig." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; return null; }; /** - * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} InputAudioConfig */ - CreateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; + case "AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "AUDIO_ENCODING_FLAC": + case 2: + message.audioEncoding = 2; + break; + case "AUDIO_ENCODING_MULAW": + case 3: + message.audioEncoding = 3; + break; + case "AUDIO_ENCODING_AMR": + case 4: + message.audioEncoding = 4; + break; + case "AUDIO_ENCODING_AMR_WB": + case 5: + message.audioEncoding = 5; + break; + case "AUDIO_ENCODING_OGG_OPUS": + case 6: + message.audioEncoding = 6; + break; + case "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": + case 7: + message.audioEncoding = 7; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.enableWordInfo != null) + message.enableWordInfo = Boolean(object.enableWordInfo); + if (object.phraseHints) { + if (!Array.isArray(object.phraseHints)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.phraseHints: array expected"); + message.phraseHints = []; + for (var i = 0; i < object.phraseHints.length; ++i) + message.phraseHints[i] = String(object.phraseHints[i]); + } + if (object.model != null) + message.model = String(object.model); + switch (object.modelVariant) { + default: + if (typeof object.modelVariant === "number") { + message.modelVariant = object.modelVariant; + break; + } + break; + case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case 0: + message.modelVariant = 0; + break; + case "USE_BEST_AVAILABLE": + case 1: + message.modelVariant = 1; + break; + case "USE_STANDARD": + case 2: + message.modelVariant = 2; + break; + case "USE_ENHANCED": + case 3: + message.modelVariant = 3; + break; + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.bargeInConfig != null) { + if (typeof object.bargeInConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.bargeInConfig: object expected"); + message.bargeInConfig = $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.fromObject(object.bargeInConfig); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.InputAudioConfig} message InputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFlowRequest.toObject = function toObject(message, options) { + InputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.phraseHints = []; if (options.defaults) { - object.parent = ""; - object.flow = null; - object.languageCode = ""; + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.model = ""; + object.singleUtterance = false; + object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + object.enableWordInfo = false; + object.bargeInConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.phraseHints && message.phraseHints.length) { + object.phraseHints = []; + for (var j = 0; j < message.phraseHints.length; ++j) + object.phraseHints[j] = message.phraseHints[j]; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.modelVariant != null && message.hasOwnProperty("modelVariant")) + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + object.enableWordInfo = message.enableWordInfo; + if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) + object.bargeInConfig = $root.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.toObject(message.bargeInConfig, options); return object; }; /** - * Converts this CreateFlowRequest to JSON. + * Converts this InputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @instance * @returns {Object.} JSON object */ - CreateFlowRequest.prototype.toJSON = function toJSON() { + InputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateFlowRequest + * Gets the default type url for InputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.InputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.InputAudioConfig"; }; - return CreateFlowRequest; + return InputAudioConfig; })(); - v3beta1.DeleteFlowRequest = (function() { + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + * @enum {number} + * @property {number} SSML_VOICE_GENDER_UNSPECIFIED=0 SSML_VOICE_GENDER_UNSPECIFIED value + * @property {number} SSML_VOICE_GENDER_MALE=1 SSML_VOICE_GENDER_MALE value + * @property {number} SSML_VOICE_GENDER_FEMALE=2 SSML_VOICE_GENDER_FEMALE value + * @property {number} SSML_VOICE_GENDER_NEUTRAL=3 SSML_VOICE_GENDER_NEUTRAL value + */ + v3beta1.SsmlVoiceGender = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSML_VOICE_GENDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SSML_VOICE_GENDER_MALE"] = 1; + values[valuesById[2] = "SSML_VOICE_GENDER_FEMALE"] = 2; + values[valuesById[3] = "SSML_VOICE_GENDER_NEUTRAL"] = 3; + return values; + })(); + + v3beta1.VoiceSelectionParams = (function() { /** - * Properties of a DeleteFlowRequest. + * Properties of a VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteFlowRequest - * @property {string|null} [name] DeleteFlowRequest name - * @property {boolean|null} [force] DeleteFlowRequest force + * @interface IVoiceSelectionParams + * @property {string|null} [name] VoiceSelectionParams name + * @property {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender */ /** - * Constructs a new DeleteFlowRequest. + * Constructs a new VoiceSelectionParams. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteFlowRequest. - * @implements IDeleteFlowRequest + * @classdesc Represents a VoiceSelectionParams. + * @implements IVoiceSelectionParams * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set */ - function DeleteFlowRequest(properties) { + function VoiceSelectionParams(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90370,80 +93394,80 @@ } /** - * DeleteFlowRequest name. + * VoiceSelectionParams name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance */ - DeleteFlowRequest.prototype.name = ""; + VoiceSelectionParams.prototype.name = ""; /** - * DeleteFlowRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * VoiceSelectionParams ssmlGender. + * @member {google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender} ssmlGender + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance */ - DeleteFlowRequest.prototype.force = false; + VoiceSelectionParams.prototype.ssmlGender = 0; /** - * Creates a new DeleteFlowRequest instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams instance */ - DeleteFlowRequest.create = function create(properties) { - return new DeleteFlowRequest(properties); + VoiceSelectionParams.create = function create(properties) { + return new VoiceSelectionParams(properties); }; /** - * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encode = function encode(message, writer) { + VoiceSelectionParams.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.ssmlGender != null && Object.hasOwnProperty.call(message, "ssmlGender")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ssmlGender); return writer; }; /** - * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decode = function decode(reader, length) { + VoiceSelectionParams.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -90452,7 +93476,7 @@ break; } case 2: { - message.force = reader.bool(); + message.ssmlGender = reader.int32(); break; } default: @@ -90464,134 +93488,165 @@ }; /** - * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { + VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFlowRequest message. + * Verifies a VoiceSelectionParams message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFlowRequest.verify = function verify(message) { + VoiceSelectionParams.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.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + switch (message.ssmlGender) { + default: + return "ssmlGender: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} VoiceSelectionParams */ - DeleteFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) + VoiceSelectionParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + switch (object.ssmlGender) { + default: + if (typeof object.ssmlGender === "number") { + message.ssmlGender = object.ssmlGender; + break; + } + break; + case "SSML_VOICE_GENDER_UNSPECIFIED": + case 0: + message.ssmlGender = 0; + break; + case "SSML_VOICE_GENDER_MALE": + case 1: + message.ssmlGender = 1; + break; + case "SSML_VOICE_GENDER_FEMALE": + case 2: + message.ssmlGender = 2; + break; + case "SSML_VOICE_GENDER_NEUTRAL": + case 3: + message.ssmlGender = 3; + break; + } return message; }; /** - * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams} message VoiceSelectionParams * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFlowRequest.toObject = function toObject(message, options) { + VoiceSelectionParams.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.force = false; + object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.ssmlGender != null && message.hasOwnProperty("ssmlGender")) + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; /** - * Converts this DeleteFlowRequest to JSON. + * Converts this VoiceSelectionParams to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @instance * @returns {Object.} JSON object */ - DeleteFlowRequest.prototype.toJSON = function toJSON() { + VoiceSelectionParams.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFlowRequest + * Gets the default type url for VoiceSelectionParams * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VoiceSelectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams"; }; - return DeleteFlowRequest; + return VoiceSelectionParams; })(); - v3beta1.ListFlowsRequest = (function() { + v3beta1.SynthesizeSpeechConfig = (function() { /** - * Properties of a ListFlowsRequest. + * Properties of a SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsRequest - * @property {string|null} [parent] ListFlowsRequest parent - * @property {number|null} [pageSize] ListFlowsRequest pageSize - * @property {string|null} [pageToken] ListFlowsRequest pageToken - * @property {string|null} [languageCode] ListFlowsRequest languageCode + * @interface ISynthesizeSpeechConfig + * @property {number|null} [speakingRate] SynthesizeSpeechConfig speakingRate + * @property {number|null} [pitch] SynthesizeSpeechConfig pitch + * @property {number|null} [volumeGainDb] SynthesizeSpeechConfig volumeGainDb + * @property {Array.|null} [effectsProfileId] SynthesizeSpeechConfig effectsProfileId + * @property {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice */ /** - * Constructs a new ListFlowsRequest. + * Constructs a new SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsRequest. - * @implements IListFlowsRequest + * @classdesc Represents a SynthesizeSpeechConfig. + * @implements ISynthesizeSpeechConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set */ - function ListFlowsRequest(properties) { + function SynthesizeSpeechConfig(properties) { + this.effectsProfileId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90599,117 +93654,134 @@ } /** - * ListFlowsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * SynthesizeSpeechConfig speakingRate. + * @member {number} speakingRate + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - ListFlowsRequest.prototype.parent = ""; + SynthesizeSpeechConfig.prototype.speakingRate = 0; /** - * ListFlowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * SynthesizeSpeechConfig pitch. + * @member {number} pitch + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - ListFlowsRequest.prototype.pageSize = 0; + SynthesizeSpeechConfig.prototype.pitch = 0; /** - * ListFlowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * SynthesizeSpeechConfig volumeGainDb. + * @member {number} volumeGainDb + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - ListFlowsRequest.prototype.pageToken = ""; + SynthesizeSpeechConfig.prototype.volumeGainDb = 0; /** - * ListFlowsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * SynthesizeSpeechConfig effectsProfileId. + * @member {Array.} effectsProfileId + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance */ - ListFlowsRequest.prototype.languageCode = ""; + SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; /** - * Creates a new ListFlowsRequest instance using the specified properties. + * SynthesizeSpeechConfig voice. + * @member {google.cloud.dialogflow.cx.v3beta1.IVoiceSelectionParams|null|undefined} voice + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + * @instance + */ + SynthesizeSpeechConfig.prototype.voice = null; + + /** + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance */ - ListFlowsRequest.create = function create(properties) { - return new ListFlowsRequest(properties); + SynthesizeSpeechConfig.create = function create(properties) { + return new SynthesizeSpeechConfig(properties); }; /** - * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encode = function encode(message, writer) { + SynthesizeSpeechConfig.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.speakingRate != null && Object.hasOwnProperty.call(message, "speakingRate")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.speakingRate); + if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.pitch); + if (message.volumeGainDb != null && Object.hasOwnProperty.call(message, "volumeGainDb")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.volumeGainDb); + if (message.voice != null && Object.hasOwnProperty.call(message, "voice")) + $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.encode(message.voice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.effectsProfileId != null && message.effectsProfileId.length) + for (var i = 0; i < message.effectsProfileId.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.effectsProfileId[i]); return writer; }; /** - * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decode = function decode(reader, length) { + SynthesizeSpeechConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.speakingRate = reader.double(); break; } case 2: { - message.pageSize = reader.int32(); + message.pitch = reader.double(); break; } case 3: { - message.pageToken = reader.string(); + message.volumeGainDb = reader.double(); + break; + } + case 5: { + if (!(message.effectsProfileId && message.effectsProfileId.length)) + message.effectsProfileId = []; + message.effectsProfileId.push(reader.string()); break; } case 4: { - message.languageCode = reader.string(); + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.decode(reader, reader.uint32()); break; } default: @@ -90721,149 +93793,197 @@ }; /** - * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { + SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsRequest message. + * Verifies a SynthesizeSpeechConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsRequest.verify = function verify(message) { + SynthesizeSpeechConfig.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.speakingRate != null && message.hasOwnProperty("speakingRate")) + if (typeof message.speakingRate !== "number") + return "speakingRate: number expected"; + if (message.pitch != null && message.hasOwnProperty("pitch")) + if (typeof message.pitch !== "number") + return "pitch: number expected"; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + if (typeof message.volumeGainDb !== "number") + return "volumeGainDb: number expected"; + if (message.effectsProfileId != null && message.hasOwnProperty("effectsProfileId")) { + if (!Array.isArray(message.effectsProfileId)) + return "effectsProfileId: array expected"; + for (var i = 0; i < message.effectsProfileId.length; ++i) + if (!$util.isString(message.effectsProfileId[i])) + return "effectsProfileId: string[] expected"; + } + if (message.voice != null && message.hasOwnProperty("voice")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.verify(message.voice); + if (error) + return "voice." + error; + } return null; }; /** - * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig */ - ListFlowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) + SynthesizeSpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); - 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.v3beta1.SynthesizeSpeechConfig(); + if (object.speakingRate != null) + message.speakingRate = Number(object.speakingRate); + if (object.pitch != null) + message.pitch = Number(object.pitch); + if (object.volumeGainDb != null) + message.volumeGainDb = Number(object.volumeGainDb); + if (object.effectsProfileId) { + if (!Array.isArray(object.effectsProfileId)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); + message.effectsProfileId = []; + for (var i = 0; i < object.effectsProfileId.length; ++i) + message.effectsProfileId[i] = String(object.effectsProfileId[i]); + } + if (object.voice != null) { + if (typeof object.voice !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice: object expected"); + message.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.fromObject(object.voice); + } return message; }; /** - * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsRequest.toObject = function toObject(message, options) { + SynthesizeSpeechConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.effectsProfileId = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.languageCode = ""; + object.speakingRate = 0; + object.pitch = 0; + object.volumeGainDb = 0; + object.voice = null; + } + if (message.speakingRate != null && message.hasOwnProperty("speakingRate")) + object.speakingRate = options.json && !isFinite(message.speakingRate) ? String(message.speakingRate) : message.speakingRate; + if (message.pitch != null && message.hasOwnProperty("pitch")) + object.pitch = options.json && !isFinite(message.pitch) ? String(message.pitch) : message.pitch; + if (message.volumeGainDb != null && message.hasOwnProperty("volumeGainDb")) + object.volumeGainDb = options.json && !isFinite(message.volumeGainDb) ? String(message.volumeGainDb) : message.volumeGainDb; + if (message.voice != null && message.hasOwnProperty("voice")) + object.voice = $root.google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.toObject(message.voice, options); + if (message.effectsProfileId && message.effectsProfileId.length) { + object.effectsProfileId = []; + for (var j = 0; j < message.effectsProfileId.length; ++j) + object.effectsProfileId[j] = message.effectsProfileId[j]; } - 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 ListFlowsRequest to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @instance * @returns {Object.} JSON object */ - ListFlowsRequest.prototype.toJSON = function toJSON() { + SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsRequest + * Gets the default type url for SynthesizeSpeechConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SynthesizeSpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig"; }; - return ListFlowsRequest; + return SynthesizeSpeechConfig; })(); - v3beta1.ListFlowsResponse = (function() { + /** + * OutputAudioEncoding enum. + * @name google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding + * @enum {number} + * @property {number} OUTPUT_AUDIO_ENCODING_UNSPECIFIED=0 OUTPUT_AUDIO_ENCODING_UNSPECIFIED value + * @property {number} OUTPUT_AUDIO_ENCODING_LINEAR_16=1 OUTPUT_AUDIO_ENCODING_LINEAR_16 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3=2 OUTPUT_AUDIO_ENCODING_MP3 value + * @property {number} OUTPUT_AUDIO_ENCODING_MP3_64_KBPS=4 OUTPUT_AUDIO_ENCODING_MP3_64_KBPS value + * @property {number} OUTPUT_AUDIO_ENCODING_OGG_OPUS=3 OUTPUT_AUDIO_ENCODING_OGG_OPUS value + * @property {number} OUTPUT_AUDIO_ENCODING_MULAW=5 OUTPUT_AUDIO_ENCODING_MULAW value + */ + v3beta1.OutputAudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "OUTPUT_AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "OUTPUT_AUDIO_ENCODING_MP3"] = 2; + values[valuesById[4] = "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS"] = 4; + values[valuesById[3] = "OUTPUT_AUDIO_ENCODING_OGG_OPUS"] = 3; + values[valuesById[5] = "OUTPUT_AUDIO_ENCODING_MULAW"] = 5; + return values; + })(); + + v3beta1.OutputAudioConfig = (function() { /** - * Properties of a ListFlowsResponse. + * Properties of an OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListFlowsResponse - * @property {Array.|null} [flows] ListFlowsResponse flows - * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken + * @interface IOutputAudioConfig + * @property {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @property {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig */ /** - * Constructs a new ListFlowsResponse. + * Constructs a new OutputAudioConfig. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListFlowsResponse. - * @implements IListFlowsResponse + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set */ - function ListFlowsResponse(properties) { - this.flows = []; + function OutputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90871,92 +93991,103 @@ } /** - * ListFlowsResponse flows. - * @member {Array.} flows - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * OutputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - ListFlowsResponse.prototype.flows = $util.emptyArray; + OutputAudioConfig.prototype.audioEncoding = 0; /** - * ListFlowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance */ - ListFlowsResponse.prototype.nextPageToken = ""; + OutputAudioConfig.prototype.sampleRateHertz = 0; /** - * Creates a new ListFlowsResponse instance using the specified properties. + * OutputAudioConfig synthesizeSpeechConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + * @instance + */ + OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + + /** + * Creates a new OutputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig instance */ - ListFlowsResponse.create = function create(properties) { - return new ListFlowsResponse(properties); + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); }; /** - * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encode = function encode(message, writer) { + OutputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flows != null && message.flows.length) - for (var i = 0; i < message.flows.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[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.audioEncoding != null && Object.hasOwnProperty.call(message, "audioEncoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sampleRateHertz); + if (message.synthesizeSpeechConfig != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfig")) + $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decode = function decode(reader, length) { + OutputAudioConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.flows && message.flows.length)) - message.flows = []; - message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); + message.audioEncoding = reader.int32(); break; } case 2: { - message.nextPageToken = reader.string(); + message.sampleRateHertz = reader.int32(); + break; + } + case 3: { + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; } default: @@ -90968,149 +94099,184 @@ }; /** - * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { + OutputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFlowsResponse message. + * Verifies an OutputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFlowsResponse.verify = function verify(message) { + OutputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flows != null && message.hasOwnProperty("flows")) { - if (!Array.isArray(message.flows)) - return "flows: array expected"; - for (var i = 0; i < message.flows.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); - if (error) - return "flows." + error; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + switch (message.audioEncoding) { + default: + return "audioEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 3: + case 5: + break; } + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (!$util.isInteger(message.sampleRateHertz)) + return "sampleRateHertz: integer expected"; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); + if (error) + return "synthesizeSpeechConfig." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} OutputAudioConfig */ - ListFlowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); - if (object.flows) { - if (!Array.isArray(object.flows)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); - message.flows = []; - for (var i = 0; i < object.flows.length; ++i) { - if (typeof object.flows[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); - message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig(); + switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; } + break; + case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.audioEncoding = 0; + break; + case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case 1: + message.audioEncoding = 1; + break; + case "OUTPUT_AUDIO_ENCODING_MP3": + case 2: + message.audioEncoding = 2; + break; + case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": + case 4: + message.audioEncoding = 4; + break; + case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case 3: + message.audioEncoding = 3; + break; + case "OUTPUT_AUDIO_ENCODING_MULAW": + case 5: + message.audioEncoding = 5; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.synthesizeSpeechConfig != null) { + if (typeof object.synthesizeSpeechConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig} message OutputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFlowsResponse.toObject = function toObject(message, options) { + OutputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.flows = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.flows && message.flows.length) { - object.flows = []; - for (var j = 0; j < message.flows.length; ++j) - object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); + if (options.defaults) { + object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.synthesizeSpeechConfig = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) + object.synthesizeSpeechConfig = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); return object; }; /** - * Converts this ListFlowsResponse to JSON. + * Converts this OutputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @instance * @returns {Object.} JSON object */ - ListFlowsResponse.prototype.toJSON = function toJSON() { + OutputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFlowsResponse + * Gets the default type url for OutputAudioConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OutputAudioConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig"; }; - return ListFlowsResponse; + return OutputAudioConfig; })(); - v3beta1.GetFlowRequest = (function() { + v3beta1.TextToSpeechSettings = (function() { /** - * Properties of a GetFlowRequest. + * Properties of a TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetFlowRequest - * @property {string|null} [name] GetFlowRequest name - * @property {string|null} [languageCode] GetFlowRequest languageCode + * @interface ITextToSpeechSettings + * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs */ /** - * Constructs a new GetFlowRequest. + * Constructs a new TextToSpeechSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetFlowRequest. - * @implements IGetFlowRequest + * @classdesc Represents a TextToSpeechSettings. + * @implements ITextToSpeechSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set */ - function GetFlowRequest(properties) { + function TextToSpeechSettings(properties) { + this.synthesizeSpeechConfigs = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91118,89 +94284,97 @@ } /** - * GetFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest - * @instance - */ - GetFlowRequest.prototype.name = ""; - - /** - * GetFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * TextToSpeechSettings synthesizeSpeechConfigs. + * @member {Object.} synthesizeSpeechConfigs + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @instance */ - GetFlowRequest.prototype.languageCode = ""; + TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; /** - * Creates a new GetFlowRequest instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings instance */ - GetFlowRequest.create = function create(properties) { - return new GetFlowRequest(properties); + TextToSpeechSettings.create = function create(properties) { + return new TextToSpeechSettings(properties); }; /** - * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encode = function encode(message, writer) { + TextToSpeechSettings.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.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) + for (var keys = Object.keys(message.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decode = function decode(reader, length) { + TextToSpeechSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); + if (message.synthesizeSpeechConfigs === $util.emptyObject) + message.synthesizeSpeechConfigs = {}; + 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.v3beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.synthesizeSpeechConfigs[key] = value; break; } default: @@ -91212,133 +94386,508 @@ }; /** - * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { + TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowRequest message. + * Verifies a TextToSpeechSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowRequest.verify = function verify(message) { + TextToSpeechSettings.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.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { + if (!$util.isObject(message.synthesizeSpeechConfigs)) + return "synthesizeSpeechConfigs: object expected"; + var key = Object.keys(message.synthesizeSpeechConfigs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); + if (error) + return "synthesizeSpeechConfigs." + error; + } + } return null; }; /** - * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} TextToSpeechSettings */ - GetFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) + TextToSpeechSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); - 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.v3beta1.TextToSpeechSettings(); + if (object.synthesizeSpeechConfigs) { + if (typeof object.synthesizeSpeechConfigs !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs = {}; + for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings} message TextToSpeechSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowRequest.toObject = function toObject(message, options) { + TextToSpeechSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; + if (options.objects || options.defaults) + object.synthesizeSpeechConfigs = {}; + var keys2; + if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { + object.synthesizeSpeechConfigs = {}; + for (var j = 0; j < keys2.length; ++j) + object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], 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 GetFlowRequest to JSON. + * Converts this TextToSpeechSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @instance * @returns {Object.} JSON object */ - GetFlowRequest.prototype.toJSON = function toJSON() { + TextToSpeechSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowRequest + * Gets the default type url for TextToSpeechSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextToSpeechSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings"; }; - return GetFlowRequest; + return TextToSpeechSettings; })(); - v3beta1.UpdateFlowRequest = (function() { + v3beta1.Flows = (function() { /** - * Properties of an UpdateFlowRequest. + * Constructs a new Flows service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateFlowRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask - * @property {string|null} [languageCode] UpdateFlowRequest languageCode + * @classdesc Represents a Flows + * @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 Flows(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Flows.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Flows; /** - * Constructs a new UpdateFlowRequest. + * Creates new Flows service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @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 {Flows} RPC service. Useful where requests and/or responses are streamed. + */ + Flows.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|createFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef CreateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.createFlow = function createFlow(request, callback) { + return this.rpcCall(createFlow, $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "CreateFlow" }); + + /** + * Calls CreateFlow. + * @function createFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} request CreateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|deleteFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef DeleteFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.deleteFlow = function deleteFlow(request, callback) { + return this.rpcCall(deleteFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFlow" }); + + /** + * Calls DeleteFlow. + * @function deleteFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} request DeleteFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|listFlows}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ListFlowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} [response] ListFlowsResponse + */ + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ListFlowsCallback} callback Node-style callback called with the error, if any, and ListFlowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.listFlows = function listFlows(request, callback) { + return this.rpcCall(listFlows, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse, request, callback); + }, "name", { value: "ListFlows" }); + + /** + * Calls ListFlows. + * @function listFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} request ListFlowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef GetFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlow = function getFlow(request, callback) { + return this.rpcCall(getFlow, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "GetFlow" }); + + /** + * Calls GetFlow. + * @function getFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} request GetFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|updateFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef UpdateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} [response] Flow + */ + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlowCallback} callback Node-style callback called with the error, if any, and Flow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.updateFlow = function updateFlow(request, callback) { + return this.rpcCall(updateFlow, $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.Flow, request, callback); + }, "name", { value: "UpdateFlow" }); + + /** + * Calls UpdateFlow. + * @function updateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} request UpdateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|trainFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef TrainFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.trainFlow = function trainFlow(request, callback) { + return this.rpcCall(trainFlow, $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TrainFlow" }); + + /** + * Calls TrainFlow. + * @function trainFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} request TrainFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|validateFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ValidateFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlowCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.validateFlow = function validateFlow(request, callback) { + return this.rpcCall(validateFlow, $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); + }, "name", { value: "ValidateFlow" }); + + /** + * Calls ValidateFlow. + * @function validateFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} request ValidateFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|getFlowValidationResult}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef GetFlowValidationResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} [response] FlowValidationResult + */ + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResultCallback} callback Node-style callback called with the error, if any, and FlowValidationResult + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.getFlowValidationResult = function getFlowValidationResult(request, callback) { + return this.rpcCall(getFlowValidationResult, $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult, request, callback); + }, "name", { value: "GetFlowValidationResult" }); + + /** + * Calls GetFlowValidationResult. + * @function getFlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} request GetFlowValidationResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|importFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ImportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.importFlow = function importFlow(request, callback) { + return this.rpcCall(importFlow, $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportFlow" }); + + /** + * Calls ImportFlow. + * @function importFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} request ImportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Flows|exportFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @typedef ExportFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Flows.prototype.exportFlow = function exportFlow(request, callback) { + return this.rpcCall(exportFlow, $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportFlow" }); + + /** + * Calls ExportFlow. + * @function exportFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Flows + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} request ExportFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Flows; + })(); + + v3beta1.NluSettings = (function() { + + /** + * Properties of a NluSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateFlowRequest. - * @implements IUpdateFlowRequest + * @interface INluSettings + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType|null} [modelType] NluSettings modelType + * @property {number|null} [classificationThreshold] NluSettings classificationThreshold + * @property {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode|null} [modelTrainingMode] NluSettings modelTrainingMode + */ + + /** + * Constructs a new NluSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a NluSettings. + * @implements INluSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set */ - function UpdateFlowRequest(properties) { + function NluSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91346,103 +94895,103 @@ } /** - * UpdateFlowRequest flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * NluSettings modelType. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType} modelType + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - UpdateFlowRequest.prototype.flow = null; + NluSettings.prototype.modelType = 0; /** - * UpdateFlowRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * NluSettings classificationThreshold. + * @member {number} classificationThreshold + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - UpdateFlowRequest.prototype.updateMask = null; + NluSettings.prototype.classificationThreshold = 0; /** - * UpdateFlowRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * NluSettings modelTrainingMode. + * @member {google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode} modelTrainingMode + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance */ - UpdateFlowRequest.prototype.languageCode = ""; + NluSettings.prototype.modelTrainingMode = 0; /** - * Creates a new UpdateFlowRequest instance using the specified properties. + * Creates a new NluSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings instance */ - UpdateFlowRequest.create = function create(properties) { - return new UpdateFlowRequest(properties); + NluSettings.create = function create(properties) { + return new NluSettings(properties); }; /** - * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encode = function encode(message, writer) { + NluSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) - $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, 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.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); + if (message.classificationThreshold != null && Object.hasOwnProperty.call(message, "classificationThreshold")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.classificationThreshold); + if (message.modelTrainingMode != null && Object.hasOwnProperty.call(message, "modelTrainingMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.modelTrainingMode); return writer; }; /** - * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. + * Encodes the specified NluSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.NluSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.INluSettings} message NluSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + NluSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer. + * Decodes a NluSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decode = function decode(reader, length) { + NluSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + message.modelType = reader.int32(); break; } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + case 3: { + message.classificationThreshold = reader.float(); break; } - case 3: { - message.languageCode = reader.string(); + case 4: { + message.modelTrainingMode = reader.int32(); break; } default: @@ -91454,149 +95003,230 @@ }; /** - * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a NluSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + NluSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFlowRequest message. + * Verifies a NluSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFlowRequest.verify = function verify(message) { + NluSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.flow != null && message.hasOwnProperty("flow")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); - if (error) - return "flow." + 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.modelType != null && message.hasOwnProperty("modelType")) + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + if (typeof message.classificationThreshold !== "number") + return "classificationThreshold: number expected"; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + switch (message.modelTrainingMode) { + default: + return "modelTrainingMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NluSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.NluSettings} NluSettings */ - UpdateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) + NluSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.NluSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); + switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.modelType = 0; + break; + case "MODEL_TYPE_STANDARD": + case 1: + message.modelType = 1; + break; + case "MODEL_TYPE_ADVANCED": + case 3: + message.modelType = 3; + break; } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.classificationThreshold != null) + message.classificationThreshold = Number(object.classificationThreshold); + switch (object.modelTrainingMode) { + default: + if (typeof object.modelTrainingMode === "number") { + message.modelTrainingMode = object.modelTrainingMode; + break; + } + break; + case "MODEL_TRAINING_MODE_UNSPECIFIED": + case 0: + message.modelTrainingMode = 0; + break; + case "MODEL_TRAINING_MODE_AUTOMATIC": + case 1: + message.modelTrainingMode = 1; + break; + case "MODEL_TRAINING_MODE_MANUAL": + case 2: + message.modelTrainingMode = 2; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a NluSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.NluSettings} message NluSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFlowRequest.toObject = function toObject(message, options) { + NluSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.flow = null; - object.updateMask = null; - object.languageCode = ""; + object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + object.classificationThreshold = 0; + object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, 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.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; + if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) + object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; + if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; /** - * Converts this UpdateFlowRequest to JSON. + * Converts this NluSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @instance * @returns {Object.} JSON object */ - UpdateFlowRequest.prototype.toJSON = function toJSON() { + NluSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateFlowRequest + * Gets the default type url for NluSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.NluSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NluSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.NluSettings"; }; - return UpdateFlowRequest; + /** + * ModelType enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} MODEL_TYPE_STANDARD=1 MODEL_TYPE_STANDARD value + * @property {number} MODEL_TYPE_ADVANCED=3 MODEL_TYPE_ADVANCED value + */ + NluSettings.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TYPE_STANDARD"] = 1; + values[valuesById[3] = "MODEL_TYPE_ADVANCED"] = 3; + return values; + })(); + + /** + * ModelTrainingMode enum. + * @name google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode + * @enum {number} + * @property {number} MODEL_TRAINING_MODE_UNSPECIFIED=0 MODEL_TRAINING_MODE_UNSPECIFIED value + * @property {number} MODEL_TRAINING_MODE_AUTOMATIC=1 MODEL_TRAINING_MODE_AUTOMATIC value + * @property {number} MODEL_TRAINING_MODE_MANUAL=2 MODEL_TRAINING_MODE_MANUAL value + */ + NluSettings.ModelTrainingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TRAINING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL_TRAINING_MODE_AUTOMATIC"] = 1; + values[valuesById[2] = "MODEL_TRAINING_MODE_MANUAL"] = 2; + return values; + })(); + + return NluSettings; })(); - v3beta1.TrainFlowRequest = (function() { + v3beta1.Flow = (function() { /** - * Properties of a TrainFlowRequest. + * Properties of a Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITrainFlowRequest - * @property {string|null} [name] TrainFlowRequest name + * @interface IFlow + * @property {string|null} [name] Flow name + * @property {string|null} [displayName] Flow displayName + * @property {string|null} [description] Flow description + * @property {Array.|null} [transitionRoutes] Flow transitionRoutes + * @property {Array.|null} [eventHandlers] Flow eventHandlers + * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups + * @property {google.cloud.dialogflow.cx.v3beta1.INluSettings|null} [nluSettings] Flow nluSettings + * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Flow advancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] Flow knowledgeConnectorSettings */ /** - * Constructs a new TrainFlowRequest. + * Constructs a new Flow. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TrainFlowRequest. - * @implements ITrainFlowRequest + * @classdesc Represents a Flow. + * @implements IFlow * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set */ - function TrainFlowRequest(properties) { + function Flow(properties) { + this.transitionRoutes = []; + this.eventHandlers = []; + this.transitionRouteGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91604,70 +95234,153 @@ } /** - * TrainFlowRequest name. + * Flow name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance */ - TrainFlowRequest.prototype.name = ""; + Flow.prototype.name = ""; /** - * Creates a new TrainFlowRequest instance using the specified properties. + * Flow displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.displayName = ""; + + /** + * Flow description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.description = ""; + + /** + * Flow transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.transitionRoutes = $util.emptyArray; + + /** + * Flow eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.eventHandlers = $util.emptyArray; + + /** + * Flow transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Flow nluSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.INluSettings|null|undefined} nluSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.nluSettings = null; + + /** + * Flow advancedSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.advancedSettings = null; + + /** + * Flow knowledgeConnectorSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @instance + */ + Flow.prototype.knowledgeConnectorSettings = null; + + /** + * Creates a new Flow instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow instance */ - TrainFlowRequest.create = function create(properties) { - return new TrainFlowRequest(properties); + Flow.create = function create(properties) { + return new Flow(properties); }; /** - * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified Flow message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encode = function encode(message, writer) { + Flow.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.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + 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.v3beta1.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. + * Encodes the specified Flow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Flow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlow} message Flow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + Flow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer. + * Decodes a Flow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decode = function decode(reader, length) { + Flow.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -91675,6 +95388,44 @@ message.name = reader.string(); break; } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + } + case 15: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 11: { + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.decode(reader, reader.uint32()); + break; + } + case 14: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + break; + } + case 18: { + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -91684,123 +95435,252 @@ }; /** - * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a Flow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { + Flow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TrainFlowRequest message. + * Verifies a Flow message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TrainFlowRequest.verify = function verify(message) { + Flow.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 TrainFlowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest - */ - TrainFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TrainFlowRequest.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; + 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.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.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } + } + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; + } + } + 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) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.verify(message.nluSettings); + if (error) + return "nluSettings." + error; + } + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); + if (error) + return "advancedSettings." + error; + } + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); + if (error) + return "knowledgeConnectorSettings." + error; + } + return null; }; /** - * Converts this TrainFlowRequest to JSON. + * Creates a Flow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Flow} Flow + */ + Flow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Flow) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Flow(); + 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.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.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.v3beta1.Flow.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + } + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.nluSettings != null) { + if (typeof object.nluSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.nluSettings: object expected"); + message.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.fromObject(object.nluSettings); + } + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + } + if (object.knowledgeConnectorSettings != null) { + if (typeof object.knowledgeConnectorSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Flow.knowledgeConnectorSettings: object expected"); + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); + } + return message; + }; + + /** + * Creates a plain object from a Flow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Flow} message Flow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Flow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.nluSettings = null; + object.advancedSettings = null; + object.knowledgeConnectorSettings = 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.transitionRoutes && message.transitionRoutes.length) { + object.transitionRoutes = []; + for (var j = 0; j < message.transitionRoutes.length; ++j) + object.transitionRoutes[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) + object.nluSettings = $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.toObject(message.nluSettings, options); + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + } + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) + object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + return object; + }; + + /** + * Converts this Flow to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @instance * @returns {Object.} JSON object */ - TrainFlowRequest.prototype.toJSON = function toJSON() { + Flow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TrainFlowRequest + * Gets the default type url for Flow * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Flow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Flow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Flow"; }; - return TrainFlowRequest; + return Flow; })(); - v3beta1.ValidateFlowRequest = (function() { + v3beta1.CreateFlowRequest = (function() { /** - * Properties of a ValidateFlowRequest. + * Properties of a CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IValidateFlowRequest - * @property {string|null} [name] ValidateFlowRequest name - * @property {string|null} [languageCode] ValidateFlowRequest languageCode + * @interface ICreateFlowRequest + * @property {string|null} [parent] CreateFlowRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] CreateFlowRequest flow + * @property {string|null} [languageCode] CreateFlowRequest languageCode */ /** - * Constructs a new ValidateFlowRequest. + * Constructs a new CreateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ValidateFlowRequest. - * @implements IValidateFlowRequest + * @classdesc Represents a CreateFlowRequest. + * @implements ICreateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set */ - function ValidateFlowRequest(properties) { + function CreateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91808,88 +95688,102 @@ } /** - * ValidateFlowRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * CreateFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - ValidateFlowRequest.prototype.name = ""; + CreateFlowRequest.prototype.parent = ""; /** - * ValidateFlowRequest languageCode. + * CreateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + * @instance + */ + CreateFlowRequest.prototype.flow = null; + + /** + * CreateFlowRequest languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance */ - ValidateFlowRequest.prototype.languageCode = ""; + CreateFlowRequest.prototype.languageCode = ""; /** - * Creates a new ValidateFlowRequest instance using the specified properties. + * Creates a new CreateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest instance */ - ValidateFlowRequest.create = function create(properties) { - return new ValidateFlowRequest(properties); + CreateFlowRequest.create = function create(properties) { + return new CreateFlowRequest(properties); }; /** - * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encode = function encode(message, writer) { + CreateFlowRequest.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.flow != null && Object.hasOwnProperty.call(message, "flow")) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. + * Encodes the specified CreateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateFlowRequest} message CreateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer. + * Decodes a CreateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decode = function decode(reader, length) { + CreateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + break; + } + case 3: { message.languageCode = reader.string(); break; } @@ -91902,35 +95796,40 @@ }; /** - * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { + CreateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidateFlowRequest message. + * Verifies a CreateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidateFlowRequest.verify = function verify(message) { + CreateFlowRequest.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.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + error; + } if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -91938,96 +95837,104 @@ }; /** - * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} CreateFlowRequest */ - ValidateFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) + CreateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } if (object.languageCode != null) message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} message ValidateFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest} message CreateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidateFlowRequest.toObject = function toObject(message, options) { + CreateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.flow = null; object.languageCode = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, options); if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; /** - * Converts this ValidateFlowRequest to JSON. + * Converts this CreateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @instance * @returns {Object.} JSON object */ - ValidateFlowRequest.prototype.toJSON = function toJSON() { + CreateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidateFlowRequest + * Gets the default type url for CreateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest"; }; - return ValidateFlowRequest; + return CreateFlowRequest; })(); - v3beta1.GetFlowValidationResultRequest = (function() { + v3beta1.DeleteFlowRequest = (function() { /** - * Properties of a GetFlowValidationResultRequest. + * Properties of a DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetFlowValidationResultRequest - * @property {string|null} [name] GetFlowValidationResultRequest name - * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode + * @interface IDeleteFlowRequest + * @property {string|null} [name] DeleteFlowRequest name + * @property {boolean|null} [force] DeleteFlowRequest force */ /** - * Constructs a new GetFlowValidationResultRequest. + * Constructs a new DeleteFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetFlowValidationResultRequest. - * @implements IGetFlowValidationResultRequest + * @classdesc Represents a DeleteFlowRequest. + * @implements IDeleteFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set */ - function GetFlowValidationResultRequest(properties) { + function DeleteFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92035,80 +95942,80 @@ } /** - * GetFlowValidationResultRequest name. + * DeleteFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - GetFlowValidationResultRequest.prototype.name = ""; + DeleteFlowRequest.prototype.name = ""; /** - * GetFlowValidationResultRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * DeleteFlowRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance */ - GetFlowValidationResultRequest.prototype.languageCode = ""; + DeleteFlowRequest.prototype.force = false; /** - * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * Creates a new DeleteFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest instance */ - GetFlowValidationResultRequest.create = function create(properties) { - return new GetFlowValidationResultRequest(properties); + DeleteFlowRequest.create = function create(properties) { + return new DeleteFlowRequest(properties); }; /** - * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encode = function encode(message, writer) { + DeleteFlowRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * Encodes the specified DeleteFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteFlowRequest} message DeleteFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * Decodes a DeleteFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decode = function decode(reader, length) { + DeleteFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -92117,7 +96024,7 @@ break; } case 2: { - message.languageCode = reader.string(); + message.force = reader.bool(); break; } default: @@ -92129,134 +96036,134 @@ }; /** - * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFlowValidationResultRequest message. + * Verifies a DeleteFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFlowValidationResultRequest.verify = function verify(message) { + DeleteFlowRequest.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.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} DeleteFlowRequest */ - GetFlowValidationResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + DeleteFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} message GetFlowValidationResultRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest} message DeleteFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFlowValidationResultRequest.toObject = function toObject(message, options) { + DeleteFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.languageCode = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this GetFlowValidationResultRequest to JSON. + * Converts this DeleteFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @instance * @returns {Object.} JSON object */ - GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { + DeleteFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFlowValidationResultRequest + * Gets the default type url for DeleteFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest"; }; - return GetFlowValidationResultRequest; + return DeleteFlowRequest; })(); - v3beta1.FlowValidationResult = (function() { + v3beta1.ListFlowsRequest = (function() { /** - * Properties of a FlowValidationResult. + * Properties of a ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlowValidationResult - * @property {string|null} [name] FlowValidationResult name - * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages - * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime + * @interface IListFlowsRequest + * @property {string|null} [parent] ListFlowsRequest parent + * @property {number|null} [pageSize] ListFlowsRequest pageSize + * @property {string|null} [pageToken] ListFlowsRequest pageToken + * @property {string|null} [languageCode] ListFlowsRequest languageCode */ /** - * Constructs a new FlowValidationResult. + * Constructs a new ListFlowsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a FlowValidationResult. - * @implements IFlowValidationResult + * @classdesc Represents a ListFlowsRequest. + * @implements IListFlowsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set */ - function FlowValidationResult(properties) { - this.validationMessages = []; + function ListFlowsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92264,106 +96171,117 @@ } /** - * FlowValidationResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * ListFlowsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - FlowValidationResult.prototype.name = ""; + ListFlowsRequest.prototype.parent = ""; /** - * FlowValidationResult validationMessages. - * @member {Array.} validationMessages - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * ListFlowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - FlowValidationResult.prototype.validationMessages = $util.emptyArray; + ListFlowsRequest.prototype.pageSize = 0; /** - * FlowValidationResult updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * ListFlowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance */ - FlowValidationResult.prototype.updateTime = null; + ListFlowsRequest.prototype.pageToken = ""; /** - * Creates a new FlowValidationResult instance using the specified properties. + * ListFlowsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + * @instance + */ + ListFlowsRequest.prototype.languageCode = ""; + + /** + * Creates a new ListFlowsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest instance */ - FlowValidationResult.create = function create(properties) { - return new FlowValidationResult(properties); + ListFlowsRequest.create = function create(properties) { + return new ListFlowsRequest(properties); }; /** - * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encode = function encode(message, writer) { + ListFlowsRequest.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.validationMessages != null && message.validationMessages.length) - for (var i = 0; i < message.validationMessages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. + * Encodes the specified ListFlowsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsRequest} message ListFlowsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer. + * Decodes a ListFlowsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decode = function decode(reader, length) { + ListFlowsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - if (!(message.validationMessages && message.validationMessages.length)) - message.validationMessages = []; - message.validationMessages.push($root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.decode(reader, reader.uint32())); + message.pageSize = reader.int32(); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + } + case 4: { + message.languageCode = reader.string(); break; } default: @@ -92375,166 +96293,149 @@ }; /** - * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { + ListFlowsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FlowValidationResult message. + * Verifies a ListFlowsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FlowValidationResult.verify = function verify(message) { + ListFlowsRequest.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.validationMessages != null && message.hasOwnProperty("validationMessages")) { - if (!Array.isArray(message.validationMessages)) - return "validationMessages: array expected"; - for (var i = 0; i < message.validationMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify(message.validationMessages[i]); - if (error) - return "validationMessages." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + 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 FlowValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} ListFlowsRequest */ - FlowValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) + ListFlowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); - if (object.name != null) - message.name = String(object.name); - if (object.validationMessages) { - if (!Array.isArray(object.validationMessages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: array expected"); - message.validationMessages = []; - for (var i = 0; i < object.validationMessages.length; ++i) { - if (typeof object.validationMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: object expected"); - message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.fromObject(object.validationMessages[i]); - } - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest(); + 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 FlowValidationResult message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} message FlowValidationResult + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest} message ListFlowsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FlowValidationResult.toObject = function toObject(message, options) { + ListFlowsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.validationMessages = []; if (options.defaults) { - object.name = ""; - object.updateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validationMessages && message.validationMessages.length) { - object.validationMessages = []; - for (var j = 0; j < message.validationMessages.length; ++j) - object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.toObject(message.validationMessages[j], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.languageCode = ""; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + 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 FlowValidationResult to JSON. + * Converts this ListFlowsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @instance * @returns {Object.} JSON object */ - FlowValidationResult.prototype.toJSON = function toJSON() { + ListFlowsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FlowValidationResult + * Gets the default type url for ListFlowsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowValidationResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest"; }; - return FlowValidationResult; + return ListFlowsRequest; })(); - v3beta1.ImportFlowRequest = (function() { + v3beta1.ListFlowsResponse = (function() { /** - * Properties of an ImportFlowRequest. + * Properties of a ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IImportFlowRequest - * @property {string|null} [parent] ImportFlowRequest parent - * @property {string|null} [flowUri] ImportFlowRequest flowUri - * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent - * @property {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption - * @property {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null} [flowImportStrategy] ImportFlowRequest flowImportStrategy + * @interface IListFlowsResponse + * @property {Array.|null} [flows] ListFlowsResponse flows + * @property {string|null} [nextPageToken] ListFlowsResponse nextPageToken */ /** - * Constructs a new ImportFlowRequest. + * Constructs a new ListFlowsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ImportFlowRequest. - * @implements IImportFlowRequest + * @classdesc Represents a ListFlowsResponse. + * @implements IListFlowsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set */ - function ImportFlowRequest(properties) { + function ListFlowsResponse(properties) { + this.flows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92542,145 +96443,92 @@ } /** - * ImportFlowRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest - * @instance - */ - ImportFlowRequest.prototype.parent = ""; - - /** - * ImportFlowRequest flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest - * @instance - */ - ImportFlowRequest.prototype.flowUri = null; - - /** - * ImportFlowRequest flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest - * @instance - */ - ImportFlowRequest.prototype.flowContent = null; - - /** - * ImportFlowRequest importOption. - * @member {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption} importOption - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest - * @instance - */ - ImportFlowRequest.prototype.importOption = 0; - - /** - * ImportFlowRequest flowImportStrategy. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null|undefined} flowImportStrategy - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * ListFlowsResponse flows. + * @member {Array.} flows + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance */ - ImportFlowRequest.prototype.flowImportStrategy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListFlowsResponse.prototype.flows = $util.emptyArray; /** - * ImportFlowRequest flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * ListFlowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance */ - Object.defineProperty(ImportFlowRequest.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListFlowsResponse.prototype.nextPageToken = ""; /** - * Creates a new ImportFlowRequest instance using the specified properties. + * Creates a new ListFlowsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse instance */ - ImportFlowRequest.create = function create(properties) { - return new ImportFlowRequest(properties); + ListFlowsResponse.create = function create(properties) { + return new ListFlowsResponse(properties); }; /** - * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * Encodes the specified ListFlowsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encode = function encode(message, writer) { + ListFlowsResponse.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); - if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); - if (message.flowImportStrategy != null && Object.hasOwnProperty.call(message, "flowImportStrategy")) - $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.encode(message.flowImportStrategy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.flows != null && message.flows.length) + for (var i = 0; i < message.flows.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flows[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 ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. + * Encodes the specified ListFlowsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListFlowsResponse} message ListFlowsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFlowsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer. + * Decodes a ListFlowsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decode = function decode(reader, length) { + ListFlowsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.flows && message.flows.length)) + message.flows = []; + message.flows.push($root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32())); break; } case 2: { - message.flowUri = reader.string(); - break; - } - case 3: { - message.flowContent = reader.bytes(); - break; - } - case 4: { - message.importOption = reader.int32(); - break; - } - case 5: { - message.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -92692,214 +96540,149 @@ }; /** - * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFlowsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + ListFlowsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowRequest message. + * Verifies a ListFlowsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowRequest.verify = function verify(message) { + ListFlowsResponse.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.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer expected"; - } - if (message.importOption != null && message.hasOwnProperty("importOption")) - switch (message.importOption) { - default: - return "importOption: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.flows != null && message.hasOwnProperty("flows")) { + if (!Array.isArray(message.flows)) + return "flows: array expected"; + for (var i = 0; i < message.flows.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flows[i]); + if (error) + return "flows." + error; } - if (message.flowImportStrategy != null && message.hasOwnProperty("flowImportStrategy")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify(message.flowImportStrategy); - if (error) - return "flowImportStrategy." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFlowsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} ListFlowsResponse */ - ImportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest) + ListFlowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; - switch (object.importOption) { - default: - if (typeof object.importOption === "number") { - message.importOption = object.importOption; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse(); + if (object.flows) { + if (!Array.isArray(object.flows)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: array expected"); + message.flows = []; + for (var i = 0; i < object.flows.length; ++i) { + if (typeof object.flows[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows: object expected"); + message.flows[i] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flows[i]); } - break; - case "IMPORT_OPTION_UNSPECIFIED": - case 0: - message.importOption = 0; - break; - case "KEEP": - case 1: - message.importOption = 1; - break; - case "FALLBACK": - case 2: - message.importOption = 2; - break; - } - if (object.flowImportStrategy != null) { - if (typeof object.flowImportStrategy !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.flowImportStrategy: object expected"); - message.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.fromObject(object.flowImportStrategy); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFlowsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} message ImportFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse} message ListFlowsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowRequest.toObject = function toObject(message, options) { + ListFlowsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; - object.flowImportStrategy = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + if (options.arrays || options.defaults) + object.flows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.flows && message.flows.length) { + object.flows = []; + for (var j = 0; j < message.flows.length; ++j) + object.flows[j] = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flows[j], options); } - if (message.importOption != null && message.hasOwnProperty("importOption")) - object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; - if (message.flowImportStrategy != null && message.hasOwnProperty("flowImportStrategy")) - object.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.toObject(message.flowImportStrategy, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ImportFlowRequest to JSON. + * Converts this ListFlowsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @instance * @returns {Object.} JSON object */ - ImportFlowRequest.prototype.toJSON = function toJSON() { + ListFlowsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowRequest + * Gets the default type url for ListFlowsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFlowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse"; }; - /** - * ImportOption enum. - * @name google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption - * @enum {number} - * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value - * @property {number} KEEP=1 KEEP value - * @property {number} FALLBACK=2 FALLBACK value - */ - ImportFlowRequest.ImportOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "KEEP"] = 1; - values[valuesById[2] = "FALLBACK"] = 2; - return values; - })(); - - return ImportFlowRequest; + return ListFlowsResponse; })(); - v3beta1.FlowImportStrategy = (function() { + v3beta1.GetFlowRequest = (function() { /** - * Properties of a FlowImportStrategy. + * Properties of a GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFlowImportStrategy - * @property {google.cloud.dialogflow.cx.v3beta1.ImportStrategy|null} [globalImportStrategy] FlowImportStrategy globalImportStrategy + * @interface IGetFlowRequest + * @property {string|null} [name] GetFlowRequest name + * @property {string|null} [languageCode] GetFlowRequest languageCode */ /** - * Constructs a new FlowImportStrategy. + * Constructs a new GetFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a FlowImportStrategy. - * @implements IFlowImportStrategy + * @classdesc Represents a GetFlowRequest. + * @implements IGetFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set */ - function FlowImportStrategy(properties) { + function GetFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92907,75 +96690,89 @@ } /** - * FlowImportStrategy globalImportStrategy. - * @member {google.cloud.dialogflow.cx.v3beta1.ImportStrategy} globalImportStrategy - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * GetFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @instance */ - FlowImportStrategy.prototype.globalImportStrategy = 0; + GetFlowRequest.prototype.name = ""; /** - * Creates a new FlowImportStrategy instance using the specified properties. + * GetFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + * @instance + */ + GetFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new GetFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest instance */ - FlowImportStrategy.create = function create(properties) { - return new FlowImportStrategy(properties); + GetFlowRequest.create = function create(properties) { + return new GetFlowRequest(properties); }; /** - * Encodes the specified FlowImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * Encodes the specified GetFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy} message FlowImportStrategy message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowImportStrategy.encode = function encode(message, writer) { + GetFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.globalImportStrategy != null && Object.hasOwnProperty.call(message, "globalImportStrategy")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.globalImportStrategy); + 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 FlowImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * Encodes the specified GetFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy} message FlowImportStrategy message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowRequest} message GetFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FlowImportStrategy.encodeDelimited = function encodeDelimited(message, writer) { + GetFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FlowImportStrategy message from the specified reader or buffer. + * Decodes a GetFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowImportStrategy.decode = function decode(reader, length) { + GetFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.globalImportStrategy = reader.int32(); + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); break; } default: @@ -92987,161 +96784,133 @@ }; /** - * Decodes a FlowImportStrategy message from the specified reader or buffer, length delimited. + * Decodes a GetFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FlowImportStrategy.decodeDelimited = function decodeDelimited(reader) { + GetFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FlowImportStrategy message. + * Verifies a GetFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FlowImportStrategy.verify = function verify(message) { + GetFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.globalImportStrategy != null && message.hasOwnProperty("globalImportStrategy")) - switch (message.globalImportStrategy) { - default: - return "globalImportStrategy: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } + 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 FlowImportStrategy message from a plain object. Also converts values to their respective internal types. + * Creates a GetFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} GetFlowRequest */ - FlowImportStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) + GetFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(); - switch (object.globalImportStrategy) { - default: - if (typeof object.globalImportStrategy === "number") { - message.globalImportStrategy = object.globalImportStrategy; - break; - } - break; - case "IMPORT_STRATEGY_UNSPECIFIED": - case 0: - message.globalImportStrategy = 0; - break; - case "IMPORT_STRATEGY_CREATE_NEW": - case 1: - message.globalImportStrategy = 1; - break; - case "IMPORT_STRATEGY_REPLACE": - case 2: - message.globalImportStrategy = 2; - break; - case "IMPORT_STRATEGY_KEEP": - case 3: - message.globalImportStrategy = 3; - break; - case "IMPORT_STRATEGY_MERGE": - case 4: - message.globalImportStrategy = 4; - break; - case "IMPORT_STRATEGY_THROW_ERROR": - case 5: - message.globalImportStrategy = 5; - break; - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowRequest(); + 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 FlowImportStrategy message. Also converts values to other types if specified. + * Creates a plain object from a GetFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} message FlowImportStrategy + * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowRequest} message GetFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FlowImportStrategy.toObject = function toObject(message, options) { + GetFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.globalImportStrategy = options.enums === String ? "IMPORT_STRATEGY_UNSPECIFIED" : 0; - if (message.globalImportStrategy != null && message.hasOwnProperty("globalImportStrategy")) - object.globalImportStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportStrategy[message.globalImportStrategy] === undefined ? message.globalImportStrategy : $root.google.cloud.dialogflow.cx.v3beta1.ImportStrategy[message.globalImportStrategy] : message.globalImportStrategy; + 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 FlowImportStrategy to JSON. + * Converts this GetFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @instance * @returns {Object.} JSON object */ - FlowImportStrategy.prototype.toJSON = function toJSON() { + GetFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FlowImportStrategy + * Gets the default type url for GetFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FlowImportStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowRequest"; }; - return FlowImportStrategy; + return GetFlowRequest; })(); - v3beta1.ImportFlowResponse = (function() { + v3beta1.UpdateFlowRequest = (function() { /** - * Properties of an ImportFlowResponse. + * Properties of an UpdateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IImportFlowResponse - * @property {string|null} [flow] ImportFlowResponse flow + * @interface IUpdateFlowRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] UpdateFlowRequest flow + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFlowRequest updateMask + * @property {string|null} [languageCode] UpdateFlowRequest languageCode */ /** - * Constructs a new ImportFlowResponse. + * Constructs a new UpdateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ImportFlowResponse. - * @implements IImportFlowResponse + * @classdesc Represents an UpdateFlowRequest. + * @implements IUpdateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set */ - function ImportFlowResponse(properties) { + function UpdateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93149,75 +96918,103 @@ } /** - * ImportFlowResponse flow. - * @member {string} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * UpdateFlowRequest flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @instance */ - ImportFlowResponse.prototype.flow = ""; + UpdateFlowRequest.prototype.flow = null; /** - * Creates a new ImportFlowResponse instance using the specified properties. + * UpdateFlowRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.updateMask = null; + + /** + * UpdateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + * @instance + */ + UpdateFlowRequest.prototype.languageCode = ""; + + /** + * Creates a new UpdateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest instance */ - ImportFlowResponse.create = function create(properties) { - return new ImportFlowResponse(properties); + UpdateFlowRequest.create = function create(properties) { + return new UpdateFlowRequest(properties); }; /** - * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encode = function encode(message, writer) { + UpdateFlowRequest.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); + $root.google.cloud.dialogflow.cx.v3beta1.Flow.encode(message.flow, 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 ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. + * Encodes the specified UpdateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateFlowRequest} message UpdateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer. + * Decodes an UpdateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decode = function decode(reader, length) { + UpdateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flow = reader.string(); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.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: @@ -93229,124 +97026,149 @@ }; /** - * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportFlowResponse message. + * Verifies an UpdateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportFlowResponse.verify = function verify(message) { + UpdateFlowRequest.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.flow != null && message.hasOwnProperty("flow")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + 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 ImportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} UpdateFlowRequest */ - ImportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse) + UpdateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); - if (object.flow != null) - message.flow = String(object.flow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest(); + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.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 ImportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} message ImportFlowResponse + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest} message UpdateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportFlowResponse.toObject = function toObject(message, options) { + UpdateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.flow = ""; + if (options.defaults) { + object.flow = null; + object.updateMask = null; + object.languageCode = ""; + } if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = message.flow; + object.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.toObject(message.flow, 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 ImportFlowResponse to JSON. + * Converts this UpdateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @instance * @returns {Object.} JSON object */ - ImportFlowResponse.prototype.toJSON = function toJSON() { + UpdateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportFlowResponse + * Gets the default type url for UpdateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest"; }; - return ImportFlowResponse; + return UpdateFlowRequest; })(); - v3beta1.ExportFlowRequest = (function() { + v3beta1.TrainFlowRequest = (function() { /** - * Properties of an ExportFlowRequest. + * Properties of a TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportFlowRequest - * @property {string|null} [name] ExportFlowRequest name - * @property {string|null} [flowUri] ExportFlowRequest flowUri - * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows + * @interface ITrainFlowRequest + * @property {string|null} [name] TrainFlowRequest name */ /** - * Constructs a new ExportFlowRequest. + * Constructs a new TrainFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportFlowRequest. - * @implements IExportFlowRequest + * @classdesc Represents a TrainFlowRequest. + * @implements ITrainFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set */ - function ExportFlowRequest(properties) { + function TrainFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93354,90 +97176,70 @@ } /** - * ExportFlowRequest name. + * TrainFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest - * @instance - */ - ExportFlowRequest.prototype.name = ""; - - /** - * ExportFlowRequest flowUri. - * @member {string} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest - * @instance - */ - ExportFlowRequest.prototype.flowUri = ""; - - /** - * ExportFlowRequest includeReferencedFlows. - * @member {boolean} includeReferencedFlows - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance */ - ExportFlowRequest.prototype.includeReferencedFlows = false; + TrainFlowRequest.prototype.name = ""; /** - * Creates a new ExportFlowRequest instance using the specified properties. + * Creates a new TrainFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest instance */ - ExportFlowRequest.create = function create(properties) { - return new ExportFlowRequest(properties); + TrainFlowRequest.create = function create(properties) { + return new TrainFlowRequest(properties); }; /** - * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * Encodes the specified TrainFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encode = function encode(message, writer) { + TrainFlowRequest.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); - if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); return writer; }; /** - * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * Encodes the specified TrainFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITrainFlowRequest} message TrainFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + TrainFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer. + * Decodes a TrainFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decode = function decode(reader, length) { + TrainFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -93445,14 +97247,6 @@ message.name = reader.string(); break; } - case 2: { - message.flowUri = reader.string(); - break; - } - case 4: { - message.includeReferencedFlows = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -93462,140 +97256,123 @@ }; /** - * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. + * Decodes a TrainFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { + TrainFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowRequest message. + * Verifies a TrainFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowRequest.verify = function verify(message) { + TrainFlowRequest.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.flowUri != null && message.hasOwnProperty("flowUri")) - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - if (typeof message.includeReferencedFlows !== "boolean") - return "includeReferencedFlows: boolean expected"; return null; }; /** - * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TrainFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} TrainFlowRequest */ - ExportFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest) + TrainFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.includeReferencedFlows != null) - message.includeReferencedFlows = Boolean(object.includeReferencedFlows); return message; }; /** - * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. + * Creates a plain object from a TrainFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} message ExportFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest} message TrainFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowRequest.toObject = function toObject(message, options) { + TrainFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.flowUri = ""; - object.includeReferencedFlows = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) - object.flowUri = message.flowUri; - if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) - object.includeReferencedFlows = message.includeReferencedFlows; return object; }; /** - * Converts this ExportFlowRequest to JSON. + * Converts this TrainFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @instance * @returns {Object.} JSON object */ - ExportFlowRequest.prototype.toJSON = function toJSON() { + TrainFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowRequest + * Gets the default type url for TrainFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TrainFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest"; }; - return ExportFlowRequest; + return TrainFlowRequest; })(); - v3beta1.ExportFlowResponse = (function() { + v3beta1.ValidateFlowRequest = (function() { /** - * Properties of an ExportFlowResponse. + * Properties of a ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IExportFlowResponse - * @property {string|null} [flowUri] ExportFlowResponse flowUri - * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent + * @interface IValidateFlowRequest + * @property {string|null} [name] ValidateFlowRequest name + * @property {string|null} [languageCode] ValidateFlowRequest languageCode */ /** - * Constructs a new ExportFlowResponse. + * Constructs a new ValidateFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an ExportFlowResponse. - * @implements IExportFlowResponse + * @classdesc Represents a ValidateFlowRequest. + * @implements IValidateFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set */ - function ExportFlowResponse(properties) { + function ValidateFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93603,103 +97380,89 @@ } /** - * ExportFlowResponse flowUri. - * @member {string|null|undefined} flowUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse - * @instance - */ - ExportFlowResponse.prototype.flowUri = null; - - /** - * ExportFlowResponse flowContent. - * @member {Uint8Array|null|undefined} flowContent - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * ValidateFlowRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance */ - ExportFlowResponse.prototype.flowContent = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ValidateFlowRequest.prototype.name = ""; /** - * ExportFlowResponse flow. - * @member {"flowUri"|"flowContent"|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * ValidateFlowRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance */ - Object.defineProperty(ExportFlowResponse.prototype, "flow", { - get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + ValidateFlowRequest.prototype.languageCode = ""; /** - * Creates a new ExportFlowResponse instance using the specified properties. + * Creates a new ValidateFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest instance */ - ExportFlowResponse.create = function create(properties) { - return new ExportFlowResponse(properties); + ValidateFlowRequest.create = function create(properties) { + return new ValidateFlowRequest(properties); }; /** - * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encode = function encode(message, writer) { + ValidateFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); - if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); + 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 ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. + * Encodes the specified ValidateFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidateFlowRequest} message ValidateFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + ValidateFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer. + * Decodes a ValidateFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decode = function decode(reader, length) { + ValidateFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.flowUri = reader.string(); + message.name = reader.string(); break; } case 2: { - message.flowContent = reader.bytes(); + message.languageCode = reader.string(); break; } default: @@ -93711,376 +97474,361 @@ }; /** - * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { + ValidateFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExportFlowResponse message. + * Verifies a ValidateFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExportFlowResponse.verify = function verify(message) { + ValidateFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - properties.flow = 1; - if (!$util.isString(message.flowUri)) - return "flowUri: string expected"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - if (properties.flow === 1) - return "flow: multiple values"; - properties.flow = 1; - if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) - return "flowContent: buffer 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 an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} ValidateFlowRequest */ - ExportFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse) + ValidateFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); - if (object.flowUri != null) - message.flowUri = String(object.flowUri); - if (object.flowContent != null) - if (typeof object.flowContent === "string") - $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); - else if (object.flowContent.length >= 0) - message.flowContent = object.flowContent; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest(); + 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 an ExportFlowResponse message. Also converts values to other types if specified. + * Creates a plain object from a ValidateFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} message ExportFlowResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest} message ValidateFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExportFlowResponse.toObject = function toObject(message, options) { + ValidateFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.flowUri != null && message.hasOwnProperty("flowUri")) { - object.flowUri = message.flowUri; - if (options.oneofs) - object.flow = "flowUri"; - } - if (message.flowContent != null && message.hasOwnProperty("flowContent")) { - object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; - if (options.oneofs) - object.flow = "flowContent"; + 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 ExportFlowResponse to JSON. + * Converts this ValidateFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @instance * @returns {Object.} JSON object */ - ExportFlowResponse.prototype.toJSON = function toJSON() { + ValidateFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExportFlowResponse + * Gets the default type url for ValidateFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidateFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest"; }; - return ExportFlowResponse; + return ValidateFlowRequest; })(); - /** - * ImportStrategy enum. - * @name google.cloud.dialogflow.cx.v3beta1.ImportStrategy - * @enum {number} - * @property {number} IMPORT_STRATEGY_UNSPECIFIED=0 IMPORT_STRATEGY_UNSPECIFIED value - * @property {number} IMPORT_STRATEGY_CREATE_NEW=1 IMPORT_STRATEGY_CREATE_NEW value - * @property {number} IMPORT_STRATEGY_REPLACE=2 IMPORT_STRATEGY_REPLACE value - * @property {number} IMPORT_STRATEGY_KEEP=3 IMPORT_STRATEGY_KEEP value - * @property {number} IMPORT_STRATEGY_MERGE=4 IMPORT_STRATEGY_MERGE value - * @property {number} IMPORT_STRATEGY_THROW_ERROR=5 IMPORT_STRATEGY_THROW_ERROR value - */ - v3beta1.ImportStrategy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPORT_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPORT_STRATEGY_CREATE_NEW"] = 1; - values[valuesById[2] = "IMPORT_STRATEGY_REPLACE"] = 2; - values[valuesById[3] = "IMPORT_STRATEGY_KEEP"] = 3; - values[valuesById[4] = "IMPORT_STRATEGY_MERGE"] = 4; - values[valuesById[5] = "IMPORT_STRATEGY_THROW_ERROR"] = 5; - return values; - })(); + v3beta1.GetFlowValidationResultRequest = (function() { - v3beta1.Pages = (function() { + /** + * Properties of a GetFlowValidationResultRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetFlowValidationResultRequest + * @property {string|null} [name] GetFlowValidationResultRequest name + * @property {string|null} [languageCode] GetFlowValidationResultRequest languageCode + */ /** - * Constructs a new Pages service. + * Constructs a new GetFlowValidationResultRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Pages - * @extends $protobuf.rpc.Service + * @classdesc Represents a GetFlowValidationResultRequest. + * @implements IGetFlowValidationResultRequest * @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.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set */ - function Pages(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function GetFlowValidationResultRequest(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]]; } - (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; - /** - * Creates new Pages service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. + * GetFlowValidationResultRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @instance */ - Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + GetFlowValidationResultRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef ListPagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse + * GetFlowValidationResultRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @instance */ + GetFlowValidationResultRequest.prototype.languageCode = ""; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse - * @returns {undefined} - * @variation 1 + * Creates a new GetFlowValidationResultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest instance */ - Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { - return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); - }, "name", { value: "ListPages" }); + GetFlowValidationResultRequest.create = function create(properties) { + return new GetFlowValidationResultRequest(properties); + }; /** - * Calls ListPages. - * @function listPages - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetFlowValidationResultRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetFlowValidationResultRequest.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; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef GetPageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Encodes the specified GetFlowValidationResultRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetFlowValidationResultRequest} message GetFlowValidationResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetFlowValidationResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { - return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "GetPage" }); + GetFlowValidationResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + }; /** - * Calls GetPage. - * @function getPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetFlowValidationResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetFlowValidationResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|createPage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef CreatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page + * Verifies a GetFlowValidationResultRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetFlowValidationResultRequest.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; + }; /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { - return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "CreatePage" }); - - /** - * Calls CreatePage. - * @function createPage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef UpdatePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page - */ - - /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { - return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); - }, "name", { value: "UpdatePage" }); - - /** - * Calls UpdatePage. - * @function updatePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetFlowValidationResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} GetFlowValidationResultRequest */ + GetFlowValidationResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|deletePage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @typedef DeletePageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a GetFlowValidationResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest} message GetFlowValidationResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetFlowValidationResultRequest.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; + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * Converts this GetFlowValidationResultRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { - return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePage" }); + GetFlowValidationResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeletePage. - * @function deletePage - * @memberof google.cloud.dialogflow.cx.v3beta1.Pages - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetFlowValidationResultRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetFlowValidationResultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest"; + }; - return Pages; + return GetFlowValidationResultRequest; })(); - v3beta1.Page = (function() { + v3beta1.FlowValidationResult = (function() { /** - * Properties of a Page. + * Properties of a FlowValidationResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IPage - * @property {string|null} [name] Page name - * @property {string|null} [displayName] Page displayName - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment - * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form - * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups - * @property {Array.|null} [transitionRoutes] Page transitionRoutes - * @property {Array.|null} [eventHandlers] Page eventHandlers - * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Page advancedSettings - * @property {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] Page knowledgeConnectorSettings + * @interface IFlowValidationResult + * @property {string|null} [name] FlowValidationResult name + * @property {Array.|null} [validationMessages] FlowValidationResult validationMessages + * @property {google.protobuf.ITimestamp|null} [updateTime] FlowValidationResult updateTime */ /** - * Constructs a new Page. + * Constructs a new FlowValidationResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Page. - * @implements IPage + * @classdesc Represents a FlowValidationResult. + * @implements IFlowValidationResult * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set */ - function Page(properties) { - this.transitionRouteGroups = []; - this.transitionRoutes = []; - this.eventHandlers = []; + function FlowValidationResult(properties) { + this.validationMessages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94088,153 +97836,91 @@ } /** - * Page name. + * FlowValidationResult name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.name = ""; - - /** - * Page displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.displayName = ""; - - /** - * Page entryFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.entryFulfillment = null; - - /** - * Page form. - * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.form = null; - - /** - * Page transitionRouteGroups. - * @member {Array.} transitionRouteGroups - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.transitionRouteGroups = $util.emptyArray; - - /** - * Page transitionRoutes. - * @member {Array.} transitionRoutes - * @memberof google.cloud.dialogflow.cx.v3beta1.Page - * @instance - */ - Page.prototype.transitionRoutes = $util.emptyArray; - - /** - * Page eventHandlers. - * @member {Array.} eventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance */ - Page.prototype.eventHandlers = $util.emptyArray; + FlowValidationResult.prototype.name = ""; /** - * Page advancedSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * FlowValidationResult validationMessages. + * @member {Array.} validationMessages + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance */ - Page.prototype.advancedSettings = null; + FlowValidationResult.prototype.validationMessages = $util.emptyArray; /** - * Page knowledgeConnectorSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * FlowValidationResult updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance */ - Page.prototype.knowledgeConnectorSettings = null; + FlowValidationResult.prototype.updateTime = null; /** - * Creates a new Page instance using the specified properties. + * Creates a new FlowValidationResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult instance */ - Page.create = function create(properties) { - return new Page(properties); + FlowValidationResult.create = function create(properties) { + return new FlowValidationResult(properties); }; /** - * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified FlowValidationResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encode = function encode(message, writer) { + FlowValidationResult.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.form != null && Object.hasOwnProperty.call(message, "form")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.transitionRoutes != null && message.transitionRoutes.length) - for (var i = 0; i < message.transitionRoutes.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.eventHandlers != null && message.eventHandlers.length) - for (var i = 0; i < message.eventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) - for (var i = 0; i < message.transitionRouteGroups.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.validationMessages != null && message.validationMessages.length) + for (var i = 0; i < message.validationMessages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.encode(message.validationMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. + * Encodes the specified FlowValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowValidationResult} message FlowValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Page.encodeDelimited = function encodeDelimited(message, writer) { + FlowValidationResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Page message from the specified reader or buffer. + * Decodes a FlowValidationResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decode = function decode(reader, length) { + FlowValidationResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -94243,41 +97929,13 @@ break; } case 2: { - message.displayName = reader.string(); - break; - } - case 7: { - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) - message.transitionRouteGroups = []; - message.transitionRouteGroups.push(reader.string()); - break; - } - case 9: { - if (!(message.transitionRoutes && message.transitionRoutes.length)) - message.transitionRoutes = []; - message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.eventHandlers && message.eventHandlers.length)) - message.eventHandlers = []; - message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - } - case 13: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + if (!(message.validationMessages && message.validationMessages.length)) + message.validationMessages = []; + message.validationMessages.push($root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.decode(reader, reader.uint32())); break; } - case 18: { - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.decode(reader, reader.uint32()); + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -94289,256 +97947,166 @@ }; /** - * Decodes a Page message from the specified reader or buffer, length delimited. + * Decodes a FlowValidationResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Page.decodeDelimited = function decodeDelimited(reader) { + FlowValidationResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Page message. + * Verifies a FlowValidationResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Page.verify = function verify(message) { + FlowValidationResult.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.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); - if (error) - return "entryFulfillment." + error; - } - if (message.form != null && message.hasOwnProperty("form")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); - if (error) - return "form." + error; - } - 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) - if (!$util.isString(message.transitionRouteGroups[i])) - return "transitionRouteGroups: 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.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); - if (error) - return "transitionRoutes." + error; - } - } - if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { - if (!Array.isArray(message.eventHandlers)) - return "eventHandlers: array expected"; - for (var i = 0; i < message.eventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (message.validationMessages != null && message.hasOwnProperty("validationMessages")) { + if (!Array.isArray(message.validationMessages)) + return "validationMessages: array expected"; + for (var i = 0; i < message.validationMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify(message.validationMessages[i]); if (error) - return "eventHandlers." + error; + return "validationMessages." + error; } } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); - if (error) - return "advancedSettings." + error; - } - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "knowledgeConnectorSettings." + error; + return "updateTime." + error; } return null; }; /** - * Creates a Page message from a plain object. Also converts values to their respective internal types. + * Creates a FlowValidationResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} FlowValidationResult */ - Page.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) + FlowValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.entryFulfillment != null) { - if (typeof object.entryFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); - message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); - } - if (object.form != null) { - if (typeof object.form !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); - message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); - } - if (object.transitionRouteGroups) { - if (!Array.isArray(object.transitionRouteGroups)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); - message.transitionRouteGroups = []; - for (var i = 0; i < object.transitionRouteGroups.length; ++i) - message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); - } - if (object.transitionRoutes) { - if (!Array.isArray(object.transitionRoutes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.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.v3beta1.Page.transitionRoutes: object expected"); - message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); - } - } - if (object.eventHandlers) { - if (!Array.isArray(object.eventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); - message.eventHandlers = []; - for (var i = 0; i < object.eventHandlers.length; ++i) { - if (typeof object.eventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); - message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + if (object.validationMessages) { + if (!Array.isArray(object.validationMessages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: array expected"); + message.validationMessages = []; + for (var i = 0; i < object.validationMessages.length; ++i) { + if (typeof object.validationMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validationMessages: object expected"); + message.validationMessages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.fromObject(object.validationMessages[i]); } } - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); - } - if (object.knowledgeConnectorSettings != null) { - if (typeof object.knowledgeConnectorSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.knowledgeConnectorSettings: object expected"); - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a Page message. Also converts values to other types if specified. + * Creates a plain object from a FlowValidationResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page + * @param {google.cloud.dialogflow.cx.v3beta1.FlowValidationResult} message FlowValidationResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Page.toObject = function toObject(message, options) { + FlowValidationResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.transitionRoutes = []; - object.eventHandlers = []; - object.transitionRouteGroups = []; - } + if (options.arrays || options.defaults) + object.validationMessages = []; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.form = null; - object.entryFulfillment = null; - object.advancedSettings = null; - object.knowledgeConnectorSettings = 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.form != null && message.hasOwnProperty("form")) - object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); - if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) - object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); - 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.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); - } - if (message.eventHandlers && message.eventHandlers.length) { - object.eventHandlers = []; - for (var j = 0; j < message.eventHandlers.length; ++j) - object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); - } - if (message.transitionRouteGroups && message.transitionRouteGroups.length) { - object.transitionRouteGroups = []; - for (var j = 0; j < message.transitionRouteGroups.length; ++j) - object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + if (message.validationMessages && message.validationMessages.length) { + object.validationMessages = []; + for (var j = 0; j < message.validationMessages.length; ++j) + object.validationMessages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.toObject(message.validationMessages[j], options); } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) - object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this Page to JSON. + * Converts this FlowValidationResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @instance * @returns {Object.} JSON object */ - Page.prototype.toJSON = function toJSON() { + FlowValidationResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Page + * Gets the default type url for FlowValidationResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowValidationResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FlowValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Page"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowValidationResult"; }; - return Page; + return FlowValidationResult; })(); - v3beta1.Form = (function() { + v3beta1.ImportFlowRequest = (function() { /** - * Properties of a Form. + * Properties of an ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IForm - * @property {Array.|null} [parameters] Form parameters + * @interface IImportFlowRequest + * @property {string|null} [parent] ImportFlowRequest parent + * @property {string|null} [flowUri] ImportFlowRequest flowUri + * @property {Uint8Array|null} [flowContent] ImportFlowRequest flowContent + * @property {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption|null} [importOption] ImportFlowRequest importOption + * @property {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null} [flowImportStrategy] ImportFlowRequest flowImportStrategy */ /** - * Constructs a new Form. + * Constructs a new ImportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Form. - * @implements IForm + * @classdesc Represents an ImportFlowRequest. + * @implements IImportFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set */ - function Form(properties) { - this.parameters = []; + function ImportFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94546,78 +98114,145 @@ } /** - * Form parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * ImportFlowRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance */ - Form.prototype.parameters = $util.emptyArray; + ImportFlowRequest.prototype.parent = ""; /** - * Creates a new Form instance using the specified properties. + * ImportFlowRequest flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @instance + */ + ImportFlowRequest.prototype.flowUri = null; + + /** + * ImportFlowRequest flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @instance + */ + ImportFlowRequest.prototype.flowContent = null; + + /** + * ImportFlowRequest importOption. + * @member {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption} importOption + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @instance + */ + ImportFlowRequest.prototype.importOption = 0; + + /** + * ImportFlowRequest flowImportStrategy. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy|null|undefined} flowImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @instance + */ + ImportFlowRequest.prototype.flowImportStrategy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportFlowRequest flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + * @instance + */ + Object.defineProperty(ImportFlowRequest.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest instance */ - Form.create = function create(properties) { - return new Form(properties); + ImportFlowRequest.create = function create(properties) { + return new ImportFlowRequest(properties); }; /** - * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified ImportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encode = function encode(message, writer) { + ImportFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.flowContent); + if (message.importOption != null && Object.hasOwnProperty.call(message, "importOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.importOption); + if (message.flowImportStrategy != null && Object.hasOwnProperty.call(message, "flowImportStrategy")) + $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.encode(message.flowImportStrategy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. + * Encodes the specified ImportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowRequest} message ImportFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Form.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Form message from the specified reader or buffer. + * Decodes an ImportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decode = function decode(reader, length) { + ImportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + } + case 2: { + message.flowUri = reader.string(); + break; + } + case 3: { + message.flowContent = reader.bytes(); + break; + } + case 4: { + message.importOption = reader.int32(); + break; + } + case 5: { + message.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.decode(reader, reader.uint32()); break; } default: @@ -94629,776 +98264,456 @@ }; /** - * Decodes a Form message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Form.decodeDelimited = function decodeDelimited(reader) { + ImportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Form message. + * Verifies an ImportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Form.verify = function verify(message) { + ImportFlowRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.v3beta1.Form.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; + } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; + } + if (message.importOption != null && message.hasOwnProperty("importOption")) + switch (message.importOption) { + default: + return "importOption: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.flowImportStrategy != null && message.hasOwnProperty("flowImportStrategy")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify(message.flowImportStrategy); + if (error) + return "flowImportStrategy." + error; } return null; }; /** - * Creates a Form message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} ImportFlowRequest */ - Form.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) + ImportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; + switch (object.importOption) { + default: + if (typeof object.importOption === "number") { + message.importOption = object.importOption; + break; } + break; + case "IMPORT_OPTION_UNSPECIFIED": + case 0: + message.importOption = 0; + break; + case "KEEP": + case 1: + message.importOption = 1; + break; + case "FALLBACK": + case 2: + message.importOption = 2; + break; + } + if (object.flowImportStrategy != null) { + if (typeof object.flowImportStrategy !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.flowImportStrategy: object expected"); + message.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.fromObject(object.flowImportStrategy); } return message; }; /** - * Creates a plain object from a Form message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form + * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest} message ImportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Form.toObject = function toObject(message, options) { + ImportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - 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.v3beta1.Form.Parameter.toObject(message.parameters[j], options); + if (options.defaults) { + object.parent = ""; + object.importOption = options.enums === String ? "IMPORT_OPTION_UNSPECIFIED" : 0; + object.flowImportStrategy = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; + if (options.oneofs) + object.flow = "flowUri"; + } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; + if (options.oneofs) + object.flow = "flowContent"; } + if (message.importOption != null && message.hasOwnProperty("importOption")) + object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; + if (message.flowImportStrategy != null && message.hasOwnProperty("flowImportStrategy")) + object.flowImportStrategy = $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.toObject(message.flowImportStrategy, options); return object; }; /** - * Converts this Form to JSON. + * Converts this ImportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @instance * @returns {Object.} JSON object */ - Form.prototype.toJSON = function toJSON() { + ImportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Form + * Gets the default type url for ImportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest"; }; - Form.Parameter = (function() { + /** + * ImportOption enum. + * @name google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption + * @enum {number} + * @property {number} IMPORT_OPTION_UNSPECIFIED=0 IMPORT_OPTION_UNSPECIFIED value + * @property {number} KEEP=1 KEEP value + * @property {number} FALLBACK=2 FALLBACK value + */ + ImportFlowRequest.ImportOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEEP"] = 1; + values[valuesById[2] = "FALLBACK"] = 2; + return values; + })(); - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @interface IParameter - * @property {string|null} [displayName] Parameter displayName - * @property {boolean|null} [required] Parameter required - * @property {string|null} [entityType] Parameter entityType - * @property {boolean|null} [isList] Parameter isList - * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior - * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue - * @property {boolean|null} [redact] Parameter redact - * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Parameter advancedSettings - */ + return ImportFlowRequest; + })(); - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.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]]; - } + v3beta1.FlowImportStrategy = (function() { - /** - * Parameter displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.displayName = ""; + /** + * Properties of a FlowImportStrategy. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IFlowImportStrategy + * @property {google.cloud.dialogflow.cx.v3beta1.ImportStrategy|null} [globalImportStrategy] FlowImportStrategy globalImportStrategy + */ - /** - * Parameter required. - * @member {boolean} required - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.required = false; + /** + * Constructs a new FlowImportStrategy. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a FlowImportStrategy. + * @implements IFlowImportStrategy + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy=} [properties] Properties to set + */ + function FlowImportStrategy(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]]; + } - /** - * Parameter entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.entityType = ""; + /** + * FlowImportStrategy globalImportStrategy. + * @member {google.cloud.dialogflow.cx.v3beta1.ImportStrategy} globalImportStrategy + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @instance + */ + FlowImportStrategy.prototype.globalImportStrategy = 0; - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.isList = false; + /** + * Creates a new FlowImportStrategy instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy instance + */ + FlowImportStrategy.create = function create(properties) { + return new FlowImportStrategy(properties); + }; - /** - * Parameter fillBehavior. - * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.fillBehavior = null; + /** + * Encodes the specified FlowImportStrategy message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy} message FlowImportStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowImportStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.globalImportStrategy != null && Object.hasOwnProperty.call(message, "globalImportStrategy")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.globalImportStrategy); + return writer; + }; - /** - * Parameter defaultValue. - * @member {google.protobuf.IValue|null|undefined} defaultValue - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.defaultValue = null; + /** + * Encodes the specified FlowImportStrategy message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFlowImportStrategy} message FlowImportStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlowImportStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Parameter redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.redact = false; + /** + * Decodes a FlowImportStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowImportStrategy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.globalImportStrategy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Parameter advancedSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @instance - */ - Parameter.prototype.advancedSettings = null; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); - if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) - $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.v3beta1.Form.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.required = reader.bool(); - break; - } - case 3: { - message.entityType = reader.string(); - break; - } - case 4: { - message.isList = reader.bool(); - break; - } - case 7: { - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); - break; - } - case 9: { - message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - case 11: { - message.redact = reader.bool(); - break; - } - case 12: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); - 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.v3beta1.Form.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.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.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.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); - if (error) - return "fillBehavior." + error; - } - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { - var error = $root.google.protobuf.Value.verify(message.defaultValue); - if (error) - return "defaultValue." + error; - } - if (message.redact != null && message.hasOwnProperty("redact")) - if (typeof message.redact !== "boolean") - return "redact: boolean expected"; - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); - if (error) - return "advancedSettings." + error; - } - return null; - }; + /** + * Decodes a FlowImportStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlowImportStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.required != null) - message.required = Boolean(object.required); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.isList != null) - message.isList = Boolean(object.isList); - if (object.fillBehavior != null) { - if (typeof object.fillBehavior !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); - message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); - } - if (object.defaultValue != null) { - if (typeof object.defaultValue !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); - message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); - } - if (object.redact != null) - message.redact = Boolean(object.redact); - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + /** + * Verifies a FlowImportStrategy message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FlowImportStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.globalImportStrategy != null && message.hasOwnProperty("globalImportStrategy")) + switch (message.globalImportStrategy) { + default: + return "globalImportStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } - return message; - }; + return null; + }; - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.displayName = ""; - object.required = false; - object.entityType = ""; - object.isList = false; - object.fillBehavior = null; - object.defaultValue = null; - object.redact = false; - object.advancedSettings = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) - object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + /** + * Creates a FlowImportStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} FlowImportStrategy + */ + FlowImportStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy) return object; - }; - - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.v3beta1.Form.Parameter"; - }; - - Parameter.FillBehavior = (function() { - - /** - * Properties of a FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @interface IFillBehavior - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment - * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers - */ - - /** - * Constructs a new FillBehavior. - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter - * @classdesc Represents a FillBehavior. - * @implements IFillBehavior - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - */ - function FillBehavior(properties) { - this.repromptEventHandlers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy(); + switch (object.globalImportStrategy) { + default: + if (typeof object.globalImportStrategy === "number") { + message.globalImportStrategy = object.globalImportStrategy; + break; } + break; + case "IMPORT_STRATEGY_UNSPECIFIED": + case 0: + message.globalImportStrategy = 0; + break; + case "IMPORT_STRATEGY_CREATE_NEW": + case 1: + message.globalImportStrategy = 1; + break; + case "IMPORT_STRATEGY_REPLACE": + case 2: + message.globalImportStrategy = 2; + break; + case "IMPORT_STRATEGY_KEEP": + case 3: + message.globalImportStrategy = 3; + break; + case "IMPORT_STRATEGY_MERGE": + case 4: + message.globalImportStrategy = 4; + break; + case "IMPORT_STRATEGY_THROW_ERROR": + case 5: + message.globalImportStrategy = 5; + break; + } + return message; + }; - /** - * FillBehavior initialPromptFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.initialPromptFulfillment = null; - - /** - * FillBehavior repromptEventHandlers. - * @member {Array.} repromptEventHandlers - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - */ - FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; - - /** - * Creates a new FillBehavior instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance - */ - FillBehavior.create = function create(properties) { - return new FillBehavior(properties); - }; - - /** - * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) - for (var i = 0; i < message.repromptEventHandlers.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) - message.repromptEventHandlers = []; - message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FillBehavior message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FillBehavior.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FillBehavior message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FillBehavior.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); - if (error) - return "initialPromptFulfillment." + error; - } - if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { - if (!Array.isArray(message.repromptEventHandlers)) - return "repromptEventHandlers: array expected"; - for (var i = 0; i < message.repromptEventHandlers.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); - if (error) - return "repromptEventHandlers." + error; - } - } - return null; - }; - - /** - * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior - */ - FillBehavior.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); - if (object.initialPromptFulfillment != null) { - if (typeof object.initialPromptFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); - message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); - } - if (object.repromptEventHandlers) { - if (!Array.isArray(object.repromptEventHandlers)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); - message.repromptEventHandlers = []; - for (var i = 0; i < object.repromptEventHandlers.length; ++i) { - if (typeof object.repromptEventHandlers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); - message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FillBehavior.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.repromptEventHandlers = []; - if (options.defaults) - object.initialPromptFulfillment = null; - if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) - object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); - if (message.repromptEventHandlers && message.repromptEventHandlers.length) { - object.repromptEventHandlers = []; - for (var j = 0; j < message.repromptEventHandlers.length; ++j) - object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); - } - return object; - }; - - /** - * Converts this FillBehavior to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @instance - * @returns {Object.} JSON object - */ - FillBehavior.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FillBehavior - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior"; - }; + /** + * Creates a plain object from a FlowImportStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy} message FlowImportStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FlowImportStrategy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.globalImportStrategy = options.enums === String ? "IMPORT_STRATEGY_UNSPECIFIED" : 0; + if (message.globalImportStrategy != null && message.hasOwnProperty("globalImportStrategy")) + object.globalImportStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportStrategy[message.globalImportStrategy] === undefined ? message.globalImportStrategy : $root.google.cloud.dialogflow.cx.v3beta1.ImportStrategy[message.globalImportStrategy] : message.globalImportStrategy; + return object; + }; - return FillBehavior; - })(); + /** + * Converts this FlowImportStrategy to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @instance + * @returns {Object.} JSON object + */ + FlowImportStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Parameter; - })(); + /** + * Gets the default type url for FlowImportStrategy + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FlowImportStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy"; + }; - return Form; + return FlowImportStrategy; })(); - v3beta1.EventHandler = (function() { + v3beta1.ImportFlowResponse = (function() { /** - * Properties of an EventHandler. + * Properties of an ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEventHandler - * @property {string|null} [name] EventHandler name - * @property {string|null} [event] EventHandler event - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment - * @property {string|null} [targetPage] EventHandler targetPage - * @property {string|null} [targetFlow] EventHandler targetFlow + * @interface IImportFlowResponse + * @property {string|null} [flow] ImportFlowResponse flow */ /** - * Constructs a new EventHandler. + * Constructs a new ImportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EventHandler. - * @implements IEventHandler + * @classdesc Represents an ImportFlowResponse. + * @implements IImportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set */ - function EventHandler(properties) { + function ImportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95406,145 +98721,75 @@ } /** - * EventHandler name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.name = ""; - - /** - * EventHandler event. - * @member {string} event - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.event = ""; - - /** - * EventHandler triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.triggerFulfillment = null; - - /** - * EventHandler targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.targetPage = null; - - /** - * EventHandler targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler - * @instance - */ - EventHandler.prototype.targetFlow = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * EventHandler target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * ImportFlowResponse flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @instance */ - Object.defineProperty(EventHandler.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportFlowResponse.prototype.flow = ""; /** - * Creates a new EventHandler instance using the specified properties. + * Creates a new ImportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse instance */ - EventHandler.create = function create(properties) { - return new EventHandler(properties); + ImportFlowResponse.create = function create(properties) { + return new ImportFlowResponse(properties); }; /** - * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * Encodes the specified ImportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encode = function encode(message, writer) { + ImportFlowResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.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.flow != null && Object.hasOwnProperty.call(message, "flow")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flow); return writer; }; /** - * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. + * Encodes the specified ImportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IImportFlowResponse} message ImportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventHandler.encodeDelimited = function encodeDelimited(message, writer) { + ImportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventHandler message from the specified reader or buffer. + * Decodes an ImportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decode = function decode(reader, length) { + ImportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } - case 4: { - message.event = reader.string(); - break; - } - case 5: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); - break; - } - case 2: { - message.targetPage = reader.string(); - break; - } - case 3: { - message.targetFlow = reader.string(); + case 1: { + message.flow = reader.string(); break; } default: @@ -95556,177 +98801,124 @@ }; /** - * Decodes an EventHandler message from the specified reader or buffer, length delimited. + * Decodes an ImportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventHandler.decodeDelimited = function decodeDelimited(reader) { + ImportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventHandler message. + * Verifies an ImportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventHandler.verify = function verify(message) { + ImportFlowResponse.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.event != null && message.hasOwnProperty("event")) - if (!$util.isString(message.event)) - return "event: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.flow != null && message.hasOwnProperty("flow")) + if (!$util.isString(message.flow)) + return "flow: string expected"; return null; }; /** - * Creates an EventHandler message from a plain object. Also converts values to their respective internal types. + * Creates an ImportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler + * @returns {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} ImportFlowResponse */ - EventHandler.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) + ImportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); - if (object.name != null) - message.name = String(object.name); - if (object.event != null) - message.event = String(object.event); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse(); + if (object.flow != null) + message.flow = String(object.flow); return message; }; /** - * Creates a plain object from an EventHandler message. Also converts values to other types if specified. + * Creates a plain object from an ImportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler + * @param {google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse} message ImportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventHandler.toObject = function toObject(message, options) { + ImportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.event = ""; - object.triggerFulfillment = null; - object.name = ""; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.target = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.target = "targetFlow"; - } - if (message.event != null && message.hasOwnProperty("event")) - object.event = message.event; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) + object.flow = ""; + if (message.flow != null && message.hasOwnProperty("flow")) + object.flow = message.flow; return object; }; /** - * Converts this EventHandler to JSON. + * Converts this ImportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @instance * @returns {Object.} JSON object */ - EventHandler.prototype.toJSON = function toJSON() { + ImportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventHandler + * Gets the default type url for ImportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EventHandler"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse"; }; - return EventHandler; + return ImportFlowResponse; })(); - v3beta1.TransitionRoute = (function() { + v3beta1.ExportFlowRequest = (function() { /** - * Properties of a TransitionRoute. + * Properties of an ExportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITransitionRoute - * @property {string|null} [name] TransitionRoute name - * @property {string|null} [description] TransitionRoute description - * @property {string|null} [intent] TransitionRoute intent - * @property {string|null} [condition] TransitionRoute condition - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment - * @property {string|null} [targetPage] TransitionRoute targetPage - * @property {string|null} [targetFlow] TransitionRoute targetFlow + * @interface IExportFlowRequest + * @property {string|null} [name] ExportFlowRequest name + * @property {string|null} [flowUri] ExportFlowRequest flowUri + * @property {boolean|null} [includeReferencedFlows] ExportFlowRequest includeReferencedFlows */ /** - * Constructs a new TransitionRoute. + * Constructs a new ExportFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TransitionRoute. - * @implements ITransitionRoute + * @classdesc Represents an ExportFlowRequest. + * @implements IExportFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set */ - function TransitionRoute(properties) { + function ExportFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -95734,173 +98926,103 @@ } /** - * TransitionRoute name. + * ExportFlowRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @instance */ - TransitionRoute.prototype.name = ""; + ExportFlowRequest.prototype.name = ""; /** - * TransitionRoute description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportFlowRequest flowUri. + * @member {string} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @instance */ - TransitionRoute.prototype.description = ""; + ExportFlowRequest.prototype.flowUri = ""; /** - * TransitionRoute intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * ExportFlowRequest includeReferencedFlows. + * @member {boolean} includeReferencedFlows + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @instance */ - TransitionRoute.prototype.intent = ""; + ExportFlowRequest.prototype.includeReferencedFlows = false; /** - * TransitionRoute condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance + * Creates a new ExportFlowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest instance */ - TransitionRoute.prototype.condition = ""; + ExportFlowRequest.create = function create(properties) { + return new ExportFlowRequest(properties); + }; /** - * TransitionRoute triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance + * Encodes the specified ExportFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - TransitionRoute.prototype.triggerFulfillment = null; + ExportFlowRequest.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowUri); + if (message.includeReferencedFlows != null && Object.hasOwnProperty.call(message, "includeReferencedFlows")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeReferencedFlows); + return writer; + }; /** - * TransitionRoute targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance + * Encodes the specified ExportFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowRequest} message ExportFlowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - TransitionRoute.prototype.targetPage = null; - - /** - * TransitionRoute targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - TransitionRoute.prototype.targetFlow = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TransitionRoute target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @instance - */ - Object.defineProperty(TransitionRoute.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TransitionRoute instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance - */ - TransitionRoute.create = function create(properties) { - return new TransitionRoute(properties); - }; - - /** - * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionRoute.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.condition != null && Object.hasOwnProperty.call(message, "condition")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); - if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); - return writer; - }; - - /** - * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRoute message from the specified reader or buffer. + * Decodes an ExportFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decode = function decode(reader, length) { + ExportFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } - case 8: { - message.description = reader.string(); - break; - } case 1: { - message.intent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.condition = reader.string(); - break; - } - case 3: { - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + message.flowUri = reader.string(); break; } case 4: { - message.targetPage = reader.string(); - break; - } - case 5: { - message.targetFlow = reader.string(); + message.includeReferencedFlows = reader.bool(); break; } default: @@ -95912,190 +99034,140 @@ }; /** - * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransitionRoute.decodeDelimited = function decodeDelimited(reader) { + ExportFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRoute message. + * Verifies an ExportFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransitionRoute.verify = function verify(message) { + ExportFlowRequest.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.intent != null && message.hasOwnProperty("intent")) - if (!$util.isString(message.intent)) - return "intent: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) - if (!$util.isString(message.condition)) - return "condition: string expected"; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); - if (error) - return "triggerFulfillment." + error; - } - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - properties.target = 1; - if (!$util.isString(message.targetPage)) - return "targetPage: string expected"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.targetFlow)) - return "targetFlow: string expected"; - } + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + if (typeof message.includeReferencedFlows !== "boolean") + return "includeReferencedFlows: boolean expected"; return null; }; /** - * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} ExportFlowRequest */ - TransitionRoute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) + ExportFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest(); if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.intent != null) - message.intent = String(object.intent); - if (object.condition != null) - message.condition = String(object.condition); - if (object.triggerFulfillment != null) { - if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); - message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); - } - if (object.targetPage != null) - message.targetPage = String(object.targetPage); - if (object.targetFlow != null) - message.targetFlow = String(object.targetFlow); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.includeReferencedFlows != null) + message.includeReferencedFlows = Boolean(object.includeReferencedFlows); return message; }; /** - * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute + * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest} message ExportFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRoute.toObject = function toObject(message, options) { + ExportFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.intent = ""; - object.condition = ""; - object.triggerFulfillment = null; object.name = ""; - object.description = ""; - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = message.intent; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); - if (message.targetPage != null && message.hasOwnProperty("targetPage")) { - object.targetPage = message.targetPage; - if (options.oneofs) - object.target = "targetPage"; - } - if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { - object.targetFlow = message.targetFlow; - if (options.oneofs) - object.target = "targetFlow"; + object.flowUri = ""; + object.includeReferencedFlows = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) + object.flowUri = message.flowUri; + if (message.includeReferencedFlows != null && message.hasOwnProperty("includeReferencedFlows")) + object.includeReferencedFlows = message.includeReferencedFlows; return object; }; /** - * Converts this TransitionRoute to JSON. + * Converts this ExportFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @instance * @returns {Object.} JSON object */ - TransitionRoute.prototype.toJSON = function toJSON() { + ExportFlowRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionRoute + * Gets the default type url for ExportFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRoute"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest"; }; - return TransitionRoute; + return ExportFlowRequest; })(); - v3beta1.ListPagesRequest = (function() { + v3beta1.ExportFlowResponse = (function() { /** - * Properties of a ListPagesRequest. + * Properties of an ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesRequest - * @property {string|null} [parent] ListPagesRequest parent - * @property {string|null} [languageCode] ListPagesRequest languageCode - * @property {number|null} [pageSize] ListPagesRequest pageSize - * @property {string|null} [pageToken] ListPagesRequest pageToken + * @interface IExportFlowResponse + * @property {string|null} [flowUri] ExportFlowResponse flowUri + * @property {Uint8Array|null} [flowContent] ExportFlowResponse flowContent */ /** - * Constructs a new ListPagesRequest. + * Constructs a new ExportFlowResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesRequest. - * @implements IListPagesRequest + * @classdesc Represents an ExportFlowResponse. + * @implements IExportFlowResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set */ - function ListPagesRequest(properties) { + function ExportFlowResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96103,117 +99175,103 @@ } /** - * ListPagesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * ExportFlowResponse flowUri. + * @member {string|null|undefined} flowUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - ListPagesRequest.prototype.parent = ""; + ExportFlowResponse.prototype.flowUri = null; /** - * ListPagesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * ExportFlowResponse flowContent. + * @member {Uint8Array|null|undefined} flowContent + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - ListPagesRequest.prototype.languageCode = ""; + ExportFlowResponse.prototype.flowContent = null; - /** - * ListPagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest - * @instance - */ - ListPagesRequest.prototype.pageSize = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListPagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * ExportFlowResponse flow. + * @member {"flowUri"|"flowContent"|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance */ - ListPagesRequest.prototype.pageToken = ""; + Object.defineProperty(ExportFlowResponse.prototype, "flow", { + get: $util.oneOfGetter($oneOfFields = ["flowUri", "flowContent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListPagesRequest instance using the specified properties. + * Creates a new ExportFlowResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse instance */ - ListPagesRequest.create = function create(properties) { - return new ListPagesRequest(properties); + ExportFlowResponse.create = function create(properties) { + return new ExportFlowResponse(properties); }; /** - * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * Encodes the specified ExportFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesRequest.encode = function encode(message, writer) { + ExportFlowResponse.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.flowUri != null && Object.hasOwnProperty.call(message, "flowUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flowUri); + if (message.flowContent != null && Object.hasOwnProperty.call(message, "flowContent")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.flowContent); return writer; }; /** - * Encodes the specified ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * Encodes the specified ExportFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IExportFlowResponse} message ExportFlowResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer. + * Decodes an ExportFlowResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesRequest.decode = function decode(reader, length) { + ExportFlowResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.flowUri = reader.string(); break; } case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); + message.flowContent = reader.bytes(); break; } default: @@ -96225,396 +99283,376 @@ }; /** - * Decodes a ListPagesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportFlowResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { + ExportFlowResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPagesRequest message. + * Verifies an ExportFlowResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPagesRequest.verify = function verify(message) { + ExportFlowResponse.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"; + var properties = {}; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + properties.flow = 1; + if (!$util.isString(message.flowUri)) + return "flowUri: string expected"; + } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + if (properties.flow === 1) + return "flow: multiple values"; + properties.flow = 1; + if (!(message.flowContent && typeof message.flowContent.length === "number" || $util.isString(message.flowContent))) + return "flowContent: buffer expected"; + } return null; }; /** - * Creates a ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportFlowResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} ExportFlowResponse */ - ListPagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) + ExportFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); - 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); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse(); + if (object.flowUri != null) + message.flowUri = String(object.flowUri); + if (object.flowContent != null) + if (typeof object.flowContent === "string") + $util.base64.decode(object.flowContent, message.flowContent = $util.newBuffer($util.base64.length(object.flowContent)), 0); + else if (object.flowContent.length >= 0) + message.flowContent = object.flowContent; return message; }; /** - * Creates a plain object from a ListPagesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportFlowResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse} message ExportFlowResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPagesRequest.toObject = function toObject(message, options) { + ExportFlowResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.pageSize = 0; - object.pageToken = ""; + if (message.flowUri != null && message.hasOwnProperty("flowUri")) { + object.flowUri = message.flowUri; + if (options.oneofs) + object.flow = "flowUri"; + } + if (message.flowContent != null && message.hasOwnProperty("flowContent")) { + object.flowContent = options.bytes === String ? $util.base64.encode(message.flowContent, 0, message.flowContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.flowContent) : message.flowContent; + if (options.oneofs) + object.flow = "flowContent"; } - 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 ListPagesRequest to JSON. + * Converts this ExportFlowResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @instance * @returns {Object.} JSON object */ - ListPagesRequest.prototype.toJSON = function toJSON() { + ExportFlowResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPagesRequest + * Gets the default type url for ExportFlowResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse"; }; - return ListPagesRequest; + return ExportFlowResponse; })(); - v3beta1.ListPagesResponse = (function() { + /** + * ImportStrategy enum. + * @name google.cloud.dialogflow.cx.v3beta1.ImportStrategy + * @enum {number} + * @property {number} IMPORT_STRATEGY_UNSPECIFIED=0 IMPORT_STRATEGY_UNSPECIFIED value + * @property {number} IMPORT_STRATEGY_CREATE_NEW=1 IMPORT_STRATEGY_CREATE_NEW value + * @property {number} IMPORT_STRATEGY_REPLACE=2 IMPORT_STRATEGY_REPLACE value + * @property {number} IMPORT_STRATEGY_KEEP=3 IMPORT_STRATEGY_KEEP value + * @property {number} IMPORT_STRATEGY_MERGE=4 IMPORT_STRATEGY_MERGE value + * @property {number} IMPORT_STRATEGY_THROW_ERROR=5 IMPORT_STRATEGY_THROW_ERROR value + */ + v3beta1.ImportStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPORT_STRATEGY_CREATE_NEW"] = 1; + values[valuesById[2] = "IMPORT_STRATEGY_REPLACE"] = 2; + values[valuesById[3] = "IMPORT_STRATEGY_KEEP"] = 3; + values[valuesById[4] = "IMPORT_STRATEGY_MERGE"] = 4; + values[valuesById[5] = "IMPORT_STRATEGY_THROW_ERROR"] = 5; + return values; + })(); - /** - * Properties of a ListPagesResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListPagesResponse - * @property {Array.|null} [pages] ListPagesResponse pages - * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken - */ + v3beta1.Pages = (function() { /** - * Constructs a new ListPagesResponse. + * Constructs a new Pages service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListPagesResponse. - * @implements IListPagesResponse + * @classdesc Represents a Pages + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [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 ListPagesResponse(properties) { - this.pages = []; - if (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 Pages(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Pages.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Pages; + /** - * ListPagesResponse pages. - * @member {Array.} pages - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Creates new Pages service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @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 {Pages} RPC service. Useful where requests and/or responses are streamed. + */ + Pages.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|listPages}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef ListPagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} [response] ListPagesResponse + */ + + /** + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.ListPagesCallback} callback Node-style callback called with the error, if any, and ListPagesResponse + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.prototype.pages = $util.emptyArray; + Object.defineProperty(Pages.prototype.listPages = function listPages(request, callback) { + return this.rpcCall(listPages, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse, request, callback); + }, "name", { value: "ListPages" }); /** - * ListPagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Calls ListPages. + * @function listPages + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} request ListPagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListPagesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|getPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef GetPageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page */ - ListPagesResponse.create = function create(properties) { - return new ListPagesResponse(properties); - }; /** - * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.GetPageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pages != null && message.pages.length) - for (var i = 0; i < message.pages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[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; - }; + Object.defineProperty(Pages.prototype.getPage = function getPage(request, callback) { + return this.rpcCall(getPage, $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "GetPage" }); /** - * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetPage. + * @function getPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} request GetPageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse - * @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.v3beta1.Pages|createPage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef CreatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page */ - ListPagesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.pages && message.pages.length)) - message.pages = []; - message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.CreatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Pages.prototype.createPage = function createPage(request, callback) { + return this.rpcCall(createPage, $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "CreatePage" }); /** - * Verifies a ListPagesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreatePage. + * @function createPage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} request CreatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pages != null && message.hasOwnProperty("pages")) { - if (!Array.isArray(message.pages)) - return "pages: array expected"; - for (var i = 0; i < message.pages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); - if (error) - return "pages." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; /** - * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Pages|updatePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef UpdatePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Page} [response] Page */ - ListPagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); - if (object.pages) { - if (!Array.isArray(object.pages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); - message.pages = []; - for (var i = 0; i < object.pages.length; ++i) { - if (typeof object.pages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); - message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePageCallback} callback Node-style callback called with the error, if any, and Page + * @returns {undefined} + * @variation 1 */ - ListPagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.pages && message.pages.length) { - object.pages = []; - for (var j = 0; j < message.pages.length; ++j) - object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + Object.defineProperty(Pages.prototype.updatePage = function updatePage(request, callback) { + return this.rpcCall(updatePage, $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest, $root.google.cloud.dialogflow.cx.v3beta1.Page, request, callback); + }, "name", { value: "UpdatePage" }); /** - * Converts this ListPagesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + * Calls UpdatePage. + * @function updatePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} request UpdatePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListPagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListPagesResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse - * @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.v3beta1.Pages|deletePage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @typedef DeletePageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesResponse"; - }; - return ListPagesResponse; + /** + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Pages.DeletePageCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Pages.prototype.deletePage = function deletePage(request, callback) { + return this.rpcCall(deletePage, $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePage" }); + + /** + * Calls DeletePage. + * @function deletePage + * @memberof google.cloud.dialogflow.cx.v3beta1.Pages + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} request DeletePageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Pages; })(); - v3beta1.GetPageRequest = (function() { + v3beta1.Page = (function() { /** - * Properties of a GetPageRequest. + * Properties of a Page. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetPageRequest - * @property {string|null} [name] GetPageRequest name - * @property {string|null} [languageCode] GetPageRequest languageCode + * @interface IPage + * @property {string|null} [name] Page name + * @property {string|null} [displayName] Page displayName + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [entryFulfillment] Page entryFulfillment + * @property {google.cloud.dialogflow.cx.v3beta1.IForm|null} [form] Page form + * @property {Array.|null} [transitionRouteGroups] Page transitionRouteGroups + * @property {Array.|null} [transitionRoutes] Page transitionRoutes + * @property {Array.|null} [eventHandlers] Page eventHandlers + * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Page advancedSettings + * @property {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] Page knowledgeConnectorSettings */ /** - * Constructs a new GetPageRequest. + * Constructs a new Page. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetPageRequest. - * @implements IGetPageRequest + * @classdesc Represents a Page. + * @implements IPage * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set */ - function GetPageRequest(properties) { + function Page(properties) { + this.transitionRouteGroups = []; + this.transitionRoutes = []; + this.eventHandlers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96622,80 +99660,153 @@ } /** - * GetPageRequest name. + * Page name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance */ - GetPageRequest.prototype.name = ""; + Page.prototype.name = ""; /** - * GetPageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * Page displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance */ - GetPageRequest.prototype.languageCode = ""; + Page.prototype.displayName = ""; /** - * Creates a new GetPageRequest instance using the specified properties. + * Page entryFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} entryFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.entryFulfillment = null; + + /** + * Page form. + * @member {google.cloud.dialogflow.cx.v3beta1.IForm|null|undefined} form + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.form = null; + + /** + * Page transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRouteGroups = $util.emptyArray; + + /** + * Page transitionRoutes. + * @member {Array.} transitionRoutes + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.transitionRoutes = $util.emptyArray; + + /** + * Page eventHandlers. + * @member {Array.} eventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.eventHandlers = $util.emptyArray; + + /** + * Page advancedSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.advancedSettings = null; + + /** + * Page knowledgeConnectorSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Page + * @instance + */ + Page.prototype.knowledgeConnectorSettings = null; + + /** + * Creates a new Page instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IPage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page instance */ - GetPageRequest.create = function create(properties) { - return new GetPageRequest(properties); + Page.create = function create(properties) { + return new Page(properties); }; /** - * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified Page message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encode = function encode(message, writer) { + Page.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.form != null && Object.hasOwnProperty.call(message, "form")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.encode(message.form, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.entryFulfillment != null && Object.hasOwnProperty.call(message, "entryFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.entryFulfillment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transitionRoutes != null && message.transitionRoutes.length) + for (var i = 0; i < message.transitionRoutes.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.eventHandlers != null && message.eventHandlers.length) + for (var i = 0; i < message.eventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.transitionRouteGroups[i]); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Page.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPage} message Page message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + Page.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPageRequest message from the specified reader or buffer. + * Decodes a Page message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPageRequest.decode = function decode(reader, length) { + Page.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -96704,249 +99815,41 @@ break; } case 2: { - message.languageCode = reader.string(); + message.displayName = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPageRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPageRequest.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 GetPageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest - */ - GetPageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); - 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 GetPageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPageRequest.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 GetPageRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @instance - * @returns {Object.} JSON object - */ - GetPageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPageRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetPageRequest"; - }; - - return GetPageRequest; - })(); - - v3beta1.CreatePageRequest = (function() { - - /** - * Properties of a CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreatePageRequest - * @property {string|null} [parent] CreatePageRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page - * @property {string|null} [languageCode] CreatePageRequest languageCode - */ - - /** - * Constructs a new CreatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreatePageRequest. - * @implements ICreatePageRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set - */ - function CreatePageRequest(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]]; - } - - /** - * CreatePageRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @instance - */ - CreatePageRequest.prototype.parent = ""; - - /** - * CreatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @instance - */ - CreatePageRequest.prototype.page = null; - - /** - * CreatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @instance - */ - CreatePageRequest.prototype.languageCode = ""; - - /** - * Creates a new CreatePageRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance - */ - CreatePageRequest.create = function create(properties) { - return new CreatePageRequest(properties); - }; - - /** - * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePageRequest.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.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, 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 CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 7: { + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); break; } - case 2: { - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + case 4: { + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.decode(reader, reader.uint32()); break; } - case 3: { - message.languageCode = reader.string(); + case 11: { + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; + } + case 9: { + if (!(message.transitionRoutes && message.transitionRoutes.length)) + message.transitionRoutes = []; + message.transitionRoutes.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.eventHandlers && message.eventHandlers.length)) + message.eventHandlers = []; + message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + } + case 13: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + break; + } + case 18: { + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.decode(reader, reader.uint32()); break; } default: @@ -96958,405 +99861,256 @@ }; /** - * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * Decodes a Page message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + Page.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePageRequest message. + * Verifies a Page message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePageRequest.verify = function verify(message) { + Page.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.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + 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.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.entryFulfillment); if (error) - return "page." + error; + return "entryFulfillment." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest - */ - CreatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + if (message.form != null && message.hasOwnProperty("form")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.verify(message.form); + if (error) + return "form." + error; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.page = null; - object.languageCode = ""; + 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) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - - /** - * Converts this CreatePageRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePageRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + 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.v3beta1.TransitionRoute.verify(message.transitionRoutes[i]); + if (error) + return "transitionRoutes." + error; + } } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreatePageRequest"; - }; - - return CreatePageRequest; - })(); - - v3beta1.UpdatePageRequest = (function() { - - /** - * Properties of an UpdatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdatePageRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page - * @property {string|null} [languageCode] UpdatePageRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask - */ - - /** - * Constructs a new UpdatePageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdatePageRequest. - * @implements IUpdatePageRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set - */ - function UpdatePageRequest(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]]; - } - - /** - * UpdatePageRequest page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @instance - */ - UpdatePageRequest.prototype.page = null; - - /** - * UpdatePageRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @instance - */ - UpdatePageRequest.prototype.languageCode = ""; - - /** - * UpdatePageRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @instance - */ - UpdatePageRequest.prototype.updateMask = null; - - /** - * Creates a new UpdatePageRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance - */ - UpdatePageRequest.create = function create(properties) { - return new UpdatePageRequest(properties); - }; - - /** - * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, 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 UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.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; + if (message.eventHandlers != null && message.hasOwnProperty("eventHandlers")) { + if (!Array.isArray(message.eventHandlers)) + return "eventHandlers: array expected"; + for (var i = 0; i < message.eventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.eventHandlers[i]); + if (error) + return "eventHandlers." + error; } } - return message; - }; - - /** - * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePageRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.page != null && message.hasOwnProperty("page")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); if (error) - return "page." + error; + return "advancedSettings." + 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 (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); if (error) - return "updateMask." + error; + return "knowledgeConnectorSettings." + error; } return null; }; /** - * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Page message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Page} Page */ - UpdatePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) + Page.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Page) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Page(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.entryFulfillment != null) { + if (typeof object.entryFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.entryFulfillment: object expected"); + message.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.entryFulfillment); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.form != null) { + if (typeof object.form !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.form: object expected"); + message.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.fromObject(object.form); + } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } + if (object.transitionRoutes) { + if (!Array.isArray(object.transitionRoutes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.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.v3beta1.Page.transitionRoutes: object expected"); + message.transitionRoutes[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoutes[i]); + } + } + if (object.eventHandlers) { + if (!Array.isArray(object.eventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: array expected"); + message.eventHandlers = []; + for (var i = 0; i < object.eventHandlers.length; ++i) { + if (typeof object.eventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.eventHandlers: object expected"); + message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandlers[i]); + } + } + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + } + if (object.knowledgeConnectorSettings != null) { + if (typeof object.knowledgeConnectorSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Page.knowledgeConnectorSettings: object expected"); + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); } return message; }; /** - * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a Page message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Page} message Page * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePageRequest.toObject = function toObject(message, options) { + Page.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.transitionRoutes = []; + object.eventHandlers = []; + object.transitionRouteGroups = []; + } if (options.defaults) { - object.page = null; - object.languageCode = ""; - object.updateMask = null; + object.name = ""; + object.displayName = ""; + object.form = null; + object.entryFulfillment = null; + object.advancedSettings = null; + object.knowledgeConnectorSettings = null; } - if (message.page != null && message.hasOwnProperty("page")) - object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, 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); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.form != null && message.hasOwnProperty("form")) + object.form = $root.google.cloud.dialogflow.cx.v3beta1.Form.toObject(message.form, options); + if (message.entryFulfillment != null && message.hasOwnProperty("entryFulfillment")) + object.entryFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.entryFulfillment, options); + 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.v3beta1.TransitionRoute.toObject(message.transitionRoutes[j], options); + } + if (message.eventHandlers && message.eventHandlers.length) { + object.eventHandlers = []; + for (var j = 0; j < message.eventHandlers.length; ++j) + object.eventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandlers[j], options); + } + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + } + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) + object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); return object; }; /** - * Converts this UpdatePageRequest to JSON. + * Converts this Page to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @instance * @returns {Object.} JSON object */ - UpdatePageRequest.prototype.toJSON = function toJSON() { + Page.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePageRequest + * Gets the default type url for Page * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Page * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Page"; }; - return UpdatePageRequest; + return Page; })(); - v3beta1.DeletePageRequest = (function() { + v3beta1.Form = (function() { /** - * Properties of a DeletePageRequest. + * Properties of a Form. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeletePageRequest - * @property {string|null} [name] DeletePageRequest name - * @property {boolean|null} [force] DeletePageRequest force + * @interface IForm + * @property {Array.|null} [parameters] Form parameters */ /** - * Constructs a new DeletePageRequest. + * Constructs a new Form. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeletePageRequest. - * @implements IDeletePageRequest + * @classdesc Represents a Form. + * @implements IForm * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set */ - function DeletePageRequest(properties) { + function Form(properties) { + this.parameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97364,89 +100118,78 @@ } /** - * DeletePageRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest - * @instance - */ - DeletePageRequest.prototype.name = ""; - - /** - * DeletePageRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * Form parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @instance */ - DeletePageRequest.prototype.force = false; + Form.prototype.parameters = $util.emptyArray; /** - * Creates a new DeletePageRequest instance using the specified properties. + * Creates a new Form instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IForm=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form instance */ - DeletePageRequest.create = function create(properties) { - return new DeletePageRequest(properties); + Form.create = function create(properties) { + return new Form(properties); }; /** - * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified Form message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encode = function encode(message, writer) { + Form.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.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.encode(message.parameters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * Encodes the specified Form message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IForm} message Form message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + Form.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer. + * Decodes a Form message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decode = function decode(reader, length) { + Form.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.decode(reader, reader.uint32())); break; } default: @@ -97458,287 +100201,924 @@ }; /** - * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * Decodes a Form message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + Form.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePageRequest message. + * Verifies a Form message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePageRequest.verify = function verify(message) { + Form.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.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.v3beta1.Form.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } return null; }; /** - * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Form message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Form} Form */ - DeletePageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) + Form.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); - 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.v3beta1.Form(); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fromObject(object.parameters[i]); + } + } return message; }; /** - * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * Creates a plain object from a Form message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Form} message Form * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePageRequest.toObject = function toObject(message, options) { + Form.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; + if (options.arrays || options.defaults) + object.parameters = []; + 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.v3beta1.Form.Parameter.toObject(message.parameters[j], options); } - 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 DeletePageRequest to JSON. + * Converts this Form to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @instance * @returns {Object.} JSON object */ - DeletePageRequest.prototype.toJSON = function toJSON() { + Form.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeletePageRequest + * Gets the default type url for Form * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Form * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Form.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeletePageRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form"; }; - return DeletePageRequest; - })(); + Form.Parameter = (function() { - v3beta1.KnowledgeConnectorSettings = (function() { + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @interface IParameter + * @property {string|null} [displayName] Parameter displayName + * @property {boolean|null} [required] Parameter required + * @property {string|null} [entityType] Parameter entityType + * @property {boolean|null} [isList] Parameter isList + * @property {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null} [fillBehavior] Parameter fillBehavior + * @property {google.protobuf.IValue|null} [defaultValue] Parameter defaultValue + * @property {boolean|null} [redact] Parameter redact + * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Parameter advancedSettings + */ - /** - * Properties of a KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IKnowledgeConnectorSettings - * @property {boolean|null} [enabled] KnowledgeConnectorSettings enabled - * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] KnowledgeConnectorSettings triggerFulfillment - * @property {string|null} [targetPage] KnowledgeConnectorSettings targetPage - * @property {string|null} [targetFlow] KnowledgeConnectorSettings targetFlow - * @property {Array.|null} [dataStoreConnections] KnowledgeConnectorSettings dataStoreConnections - */ + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Form.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]]; + } - /** - * Constructs a new KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a KnowledgeConnectorSettings. - * @implements IKnowledgeConnectorSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings=} [properties] Properties to set - */ - function KnowledgeConnectorSettings(properties) { - this.dataStoreConnections = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Parameter displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.displayName = ""; - /** - * KnowledgeConnectorSettings enabled. - * @member {boolean} enabled - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.enabled = false; + /** + * Parameter required. + * @member {boolean} required + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.required = false; - /** - * KnowledgeConnectorSettings triggerFulfillment. - * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.triggerFulfillment = null; + /** + * Parameter entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.entityType = ""; - /** - * KnowledgeConnectorSettings targetPage. - * @member {string|null|undefined} targetPage - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.targetPage = null; + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.isList = false; - /** - * KnowledgeConnectorSettings targetFlow. - * @member {string|null|undefined} targetFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.targetFlow = null; + /** + * Parameter fillBehavior. + * @member {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior|null|undefined} fillBehavior + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.fillBehavior = null; - /** - * KnowledgeConnectorSettings dataStoreConnections. - * @member {Array.} dataStoreConnections - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.dataStoreConnections = $util.emptyArray; + /** + * Parameter defaultValue. + * @member {google.protobuf.IValue|null|undefined} defaultValue + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.defaultValue = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Parameter redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.redact = false; - /** - * KnowledgeConnectorSettings target. - * @member {"targetPage"|"targetFlow"|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings - * @instance - */ - Object.defineProperty(KnowledgeConnectorSettings.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + /** + * Parameter advancedSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @instance + */ + Parameter.prototype.advancedSettings = null; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entityType); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isList); + if (message.fillBehavior != null && Object.hasOwnProperty.call(message, "fillBehavior")) + $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.encode(message.fillBehavior, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + $root.google.protobuf.Value.encode(message.defaultValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.redact != null && Object.hasOwnProperty.call(message, "redact")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.redact); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.v3beta1.Form.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.required = reader.bool(); + break; + } + case 3: { + message.entityType = reader.string(); + break; + } + case 4: { + message.isList = reader.bool(); + break; + } + case 7: { + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.decode(reader, reader.uint32()); + break; + } + case 9: { + message.defaultValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 11: { + message.redact = reader.bool(); + break; + } + case 12: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + 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.v3beta1.Form.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.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.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.fillBehavior != null && message.hasOwnProperty("fillBehavior")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify(message.fillBehavior); + if (error) + return "fillBehavior." + error; + } + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) { + var error = $root.google.protobuf.Value.verify(message.defaultValue); + if (error) + return "defaultValue." + error; + } + if (message.redact != null && message.hasOwnProperty("redact")) + if (typeof message.redact !== "boolean") + return "redact: boolean expected"; + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); + if (error) + return "advancedSettings." + error; + } + 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.v3beta1.Form.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.required != null) + message.required = Boolean(object.required); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.isList != null) + message.isList = Boolean(object.isList); + if (object.fillBehavior != null) { + if (typeof object.fillBehavior !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fillBehavior: object expected"); + message.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.fromObject(object.fillBehavior); + } + if (object.defaultValue != null) { + if (typeof object.defaultValue !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.defaultValue: object expected"); + message.defaultValue = $root.google.protobuf.Value.fromObject(object.defaultValue); + } + if (object.redact != null) + message.redact = Boolean(object.redact); + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + } + 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.v3beta1.Form.Parameter + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.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.displayName = ""; + object.required = false; + object.entityType = ""; + object.isList = false; + object.fillBehavior = null; + object.defaultValue = null; + object.redact = false; + object.advancedSettings = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; + if (message.fillBehavior != null && message.hasOwnProperty("fillBehavior")) + object.fillBehavior = $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.toObject(message.fillBehavior, options); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = $root.google.protobuf.Value.toObject(message.defaultValue, options); + if (message.redact != null && message.hasOwnProperty("redact")) + object.redact = message.redact; + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.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.v3beta1.Form.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.v3beta1.Form.Parameter"; + }; + + Parameter.FillBehavior = (function() { + + /** + * Properties of a FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @interface IFillBehavior + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [initialPromptFulfillment] FillBehavior initialPromptFulfillment + * @property {Array.|null} [repromptEventHandlers] FillBehavior repromptEventHandlers + */ + + /** + * Constructs a new FillBehavior. + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter + * @classdesc Represents a FillBehavior. + * @implements IFillBehavior + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set + */ + function FillBehavior(properties) { + this.repromptEventHandlers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FillBehavior initialPromptFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} initialPromptFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.initialPromptFulfillment = null; + + /** + * FillBehavior repromptEventHandlers. + * @member {Array.} repromptEventHandlers + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + */ + FillBehavior.prototype.repromptEventHandlers = $util.emptyArray; + + /** + * Creates a new FillBehavior instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior instance + */ + FillBehavior.create = function create(properties) { + return new FillBehavior(properties); + }; + + /** + * Encodes the specified FillBehavior message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPromptFulfillment != null && Object.hasOwnProperty.call(message, "initialPromptFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.initialPromptFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.repromptEventHandlers != null && message.repromptEventHandlers.length) + for (var i = 0; i < message.repromptEventHandlers.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.encode(message.repromptEventHandlers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FillBehavior message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.IFillBehavior} message FillBehavior message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FillBehavior.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.repromptEventHandlers && message.repromptEventHandlers.length)) + message.repromptEventHandlers = []; + message.repromptEventHandlers.push($root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FillBehavior message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FillBehavior.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FillBehavior message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FillBehavior.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.initialPromptFulfillment); + if (error) + return "initialPromptFulfillment." + error; + } + if (message.repromptEventHandlers != null && message.hasOwnProperty("repromptEventHandlers")) { + if (!Array.isArray(message.repromptEventHandlers)) + return "repromptEventHandlers: array expected"; + for (var i = 0; i < message.repromptEventHandlers.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.verify(message.repromptEventHandlers[i]); + if (error) + return "repromptEventHandlers." + error; + } + } + return null; + }; + + /** + * Creates a FillBehavior message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} FillBehavior + */ + FillBehavior.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior(); + if (object.initialPromptFulfillment != null) { + if (typeof object.initialPromptFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initialPromptFulfillment: object expected"); + message.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.initialPromptFulfillment); + } + if (object.repromptEventHandlers) { + if (!Array.isArray(object.repromptEventHandlers)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: array expected"); + message.repromptEventHandlers = []; + for (var i = 0; i < object.repromptEventHandlers.length; ++i) { + if (typeof object.repromptEventHandlers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.repromptEventHandlers: object expected"); + message.repromptEventHandlers[i] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.repromptEventHandlers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FillBehavior message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior} message FillBehavior + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FillBehavior.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.repromptEventHandlers = []; + if (options.defaults) + object.initialPromptFulfillment = null; + if (message.initialPromptFulfillment != null && message.hasOwnProperty("initialPromptFulfillment")) + object.initialPromptFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.initialPromptFulfillment, options); + if (message.repromptEventHandlers && message.repromptEventHandlers.length) { + object.repromptEventHandlers = []; + for (var j = 0; j < message.repromptEventHandlers.length; ++j) + object.repromptEventHandlers[j] = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.repromptEventHandlers[j], options); + } + return object; + }; + + /** + * Converts this FillBehavior to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @instance + * @returns {Object.} JSON object + */ + FillBehavior.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FillBehavior + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FillBehavior.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior"; + }; + + return FillBehavior; + })(); + + return Parameter; + })(); + + return Form; + })(); + + v3beta1.EventHandler = (function() { + + /** + * Properties of an EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IEventHandler + * @property {string|null} [name] EventHandler name + * @property {string|null} [event] EventHandler event + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] EventHandler triggerFulfillment + * @property {string|null} [targetPage] EventHandler targetPage + * @property {string|null} [targetFlow] EventHandler targetFlow + */ + + /** + * Constructs a new EventHandler. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an EventHandler. + * @implements IEventHandler + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + */ + function EventHandler(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]]; + } + + /** + * EventHandler name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.name = ""; + + /** + * EventHandler event. + * @member {string} event + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.event = ""; + + /** + * EventHandler triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.triggerFulfillment = null; + + /** + * EventHandler targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetPage = null; + + /** + * EventHandler targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + EventHandler.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EventHandler target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler + * @instance + */ + Object.defineProperty(EventHandler.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * Creates a new EventHandler instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler instance */ - KnowledgeConnectorSettings.create = function create(properties) { - return new KnowledgeConnectorSettings(properties); + EventHandler.create = function create(properties) { + return new EventHandler(properties); }; /** - * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. + * Encodes the specified EventHandler message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeConnectorSettings.encode = function encode(message, writer) { + EventHandler.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetPage); if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); - if (message.dataStoreConnections != null && message.dataStoreConnections.length) - for (var i = 0; i < message.dataStoreConnections.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.encode(message.dataStoreConnections[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.targetFlow); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.event); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.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); return writer; }; /** - * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. + * Encodes the specified EventHandler message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EventHandler.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEventHandler} message EventHandler message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeConnectorSettings.encodeDelimited = function encodeDelimited(message, writer) { + EventHandler.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * Decodes an EventHandler message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler * @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) { + EventHandler.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); + case 6: { + message.name = reader.string(); break; } - case 3: { + case 4: { + message.event = reader.string(); + break; + } + case 5: { message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); break; } - case 4: { + case 2: { message.targetPage = reader.string(); break; } - case 5: { + case 3: { message.targetFlow = reader.string(); break; } - case 6: { - if (!(message.dataStoreConnections && message.dataStoreConnections.length)) - message.dataStoreConnections = []; - message.dataStoreConnections.push($root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -97748,36 +101128,39 @@ }; /** - * Decodes a KnowledgeConnectorSettings 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.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler * @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) { + EventHandler.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KnowledgeConnectorSettings message. + * Verifies an EventHandler message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @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) { + EventHandler.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + if (!$util.isString(message.event)) + return "event: string expected"; if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); if (error) @@ -97795,77 +101178,55 @@ if (!$util.isString(message.targetFlow)) return "targetFlow: string 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.v3beta1.DataStoreConnection.verify(message.dataStoreConnections[i]); - if (error) - return "dataStoreConnections." + error; - } - } return null; }; /** - * Creates a KnowledgeConnectorSettings 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.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.EventHandler} EventHandler */ - KnowledgeConnectorSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) + EventHandler.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EventHandler) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EventHandler(); + if (object.name != null) + message.name = String(object.name); + if (object.event != null) + message.event = String(object.event); if (object.triggerFulfillment != null) { if (typeof object.triggerFulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.triggerFulfillment: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.EventHandler.triggerFulfillment: object expected"); message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); } if (object.targetPage != null) message.targetPage = String(object.targetPage); if (object.targetFlow != null) message.targetFlow = String(object.targetFlow); - if (object.dataStoreConnections) { - if (!Array.isArray(object.dataStoreConnections)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.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.v3beta1.KnowledgeConnectorSettings.dataStoreConnections: object expected"); - message.dataStoreConnections[i] = $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.fromObject(object.dataStoreConnections[i]); - } - } return message; }; /** - * Creates a plain object from a KnowledgeConnectorSettings 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.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static - * @param {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} message KnowledgeConnectorSettings + * @param {google.cloud.dialogflow.cx.v3beta1.EventHandler} message EventHandler * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KnowledgeConnectorSettings.toObject = function toObject(message, options) { + EventHandler.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dataStoreConnections = []; if (options.defaults) { - object.enabled = false; + object.event = ""; object.triggerFulfillment = null; + object.name = ""; } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) - object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); if (message.targetPage != null && message.hasOwnProperty("targetPage")) { object.targetPage = message.targetPage; if (options.oneofs) @@ -97876,62 +101237,68 @@ if (options.oneofs) object.target = "targetFlow"; } - 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.v3beta1.DataStoreConnection.toObject(message.dataStoreConnections[j], options); - } + if (message.event != null && message.hasOwnProperty("event")) + object.event = message.event; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this KnowledgeConnectorSettings to JSON. + * Converts this EventHandler to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @instance * @returns {Object.} JSON object */ - KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { + EventHandler.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KnowledgeConnectorSettings + * Gets the default type url for EventHandler * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.EventHandler * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KnowledgeConnectorSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventHandler.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EventHandler"; }; - return KnowledgeConnectorSettings; + return EventHandler; })(); - v3beta1.DataStoreConnection = (function() { + v3beta1.TransitionRoute = (function() { /** - * Properties of a DataStoreConnection. + * Properties of a TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDataStoreConnection - * @property {google.cloud.dialogflow.cx.v3beta1.DataStoreType|null} [dataStoreType] DataStoreConnection dataStoreType - * @property {string|null} [dataStore] DataStoreConnection dataStore + * @interface ITransitionRoute + * @property {string|null} [name] TransitionRoute name + * @property {string|null} [description] TransitionRoute description + * @property {string|null} [intent] TransitionRoute intent + * @property {string|null} [condition] TransitionRoute condition + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] TransitionRoute triggerFulfillment + * @property {string|null} [targetPage] TransitionRoute targetPage + * @property {string|null} [targetFlow] TransitionRoute targetFlow */ /** - * Constructs a new DataStoreConnection. + * Constructs a new TransitionRoute. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DataStoreConnection. - * @implements IDataStoreConnection + * @classdesc Represents a TransitionRoute. + * @implements ITransitionRoute * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set */ - function DataStoreConnection(properties) { + function TransitionRoute(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97939,89 +101306,173 @@ } /** - * DataStoreConnection dataStoreType. - * @member {google.cloud.dialogflow.cx.v3beta1.DataStoreType} dataStoreType - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * TransitionRoute name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance */ - DataStoreConnection.prototype.dataStoreType = 0; + TransitionRoute.prototype.name = ""; /** - * DataStoreConnection dataStore. - * @member {string} dataStore - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * TransitionRoute description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance */ - DataStoreConnection.prototype.dataStore = ""; + TransitionRoute.prototype.description = ""; /** - * Creates a new DataStoreConnection instance using the specified properties. + * TransitionRoute intent. + * @member {string} intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.intent = ""; + + /** + * TransitionRoute condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.condition = ""; + + /** + * TransitionRoute triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.triggerFulfillment = null; + + /** + * TransitionRoute targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetPage = null; + + /** + * TransitionRoute targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + TransitionRoute.prototype.targetFlow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransitionRoute target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @instance + */ + Object.defineProperty(TransitionRoute.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransitionRoute instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute instance */ - DataStoreConnection.create = function create(properties) { - return new DataStoreConnection(properties); + TransitionRoute.create = function create(properties) { + return new TransitionRoute(properties); }; /** - * Encodes the specified DataStoreConnection message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * Encodes the specified TransitionRoute message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection} message DataStoreConnection message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStoreConnection.encode = function encode(message, writer) { + TransitionRoute.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataStoreType != null && Object.hasOwnProperty.call(message, "dataStoreType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataStoreType); - if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataStore); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intent); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.condition); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.description); return writer; }; /** - * Encodes the specified DataStoreConnection message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * Encodes the specified TransitionRoute message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection} message DataStoreConnection message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute} message TransitionRoute message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataStoreConnection.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRoute.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataStoreConnection message from the specified reader or buffer. + * Decodes a TransitionRoute message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStoreConnection.decode = function decode(reader, length) { + TransitionRoute.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.name = reader.string(); + break; + } + case 8: { + message.description = reader.string(); + break; + } case 1: { - message.dataStoreType = reader.int32(); + message.intent = reader.string(); break; } case 2: { - message.dataStore = reader.string(); + message.condition = reader.string(); + break; + } + case 3: { + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.targetPage = reader.string(); + break; + } + case 5: { + message.targetFlow = reader.string(); break; } default: @@ -98033,188 +101484,190 @@ }; /** - * Decodes a DataStoreConnection message from the specified reader or buffer, length delimited. + * Decodes a TransitionRoute message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataStoreConnection.decodeDelimited = function decodeDelimited(reader) { + TransitionRoute.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataStoreConnection message. + * Verifies a TransitionRoute message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataStoreConnection.verify = function verify(message) { + TransitionRoute.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataStoreType != null && message.hasOwnProperty("dataStoreType")) - switch (message.dataStoreType) { - default: - return "dataStoreType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - if (!$util.isString(message.dataStore)) - return "dataStore: string expected"; - return null; - }; - - /** - * Creates a DataStoreConnection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection - */ - DataStoreConnection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + var properties = {}; + 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.intent != null && message.hasOwnProperty("intent")) + if (!$util.isString(message.intent)) + return "intent: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); + if (error) + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string expected"; + } + return null; + }; + + /** + * Creates a TransitionRoute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} TransitionRoute + */ + TransitionRoute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(); - switch (object.dataStoreType) { - default: - if (typeof object.dataStoreType === "number") { - message.dataStoreType = object.dataStoreType; - break; - } - break; - case "DATA_STORE_TYPE_UNSPECIFIED": - case 0: - message.dataStoreType = 0; - break; - case "PUBLIC_WEB": - case 1: - message.dataStoreType = 1; - break; - case "UNSTRUCTURED": - case 2: - message.dataStoreType = 2; - break; - case "STRUCTURED": - case 3: - message.dataStoreType = 3; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.intent != null) + message.intent = String(object.intent); + if (object.condition != null) + message.condition = String(object.condition); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRoute.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); } - if (object.dataStore != null) - message.dataStore = String(object.dataStore); + 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 DataStoreConnection message. Also converts values to other types if specified. + * Creates a plain object from a TransitionRoute message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} message DataStoreConnection + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRoute} message TransitionRoute * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataStoreConnection.toObject = function toObject(message, options) { + TransitionRoute.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataStoreType = options.enums === String ? "DATA_STORE_TYPE_UNSPECIFIED" : 0; - object.dataStore = ""; + object.intent = ""; + object.condition = ""; + object.triggerFulfillment = null; + object.name = ""; + object.description = ""; } - if (message.dataStoreType != null && message.hasOwnProperty("dataStoreType")) - object.dataStoreType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.DataStoreType[message.dataStoreType] === undefined ? message.dataStoreType : $root.google.cloud.dialogflow.cx.v3beta1.DataStoreType[message.dataStoreType] : message.dataStoreType; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - object.dataStore = message.dataStore; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = message.intent; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this DataStoreConnection to JSON. + * Converts this TransitionRoute to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @instance * @returns {Object.} JSON object */ - DataStoreConnection.prototype.toJSON = function toJSON() { + TransitionRoute.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataStoreConnection + * Gets the default type url for TransitionRoute * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRoute * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataStoreConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionRoute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DataStoreConnection"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRoute"; }; - return DataStoreConnection; - })(); - - /** - * DataStoreType enum. - * @name google.cloud.dialogflow.cx.v3beta1.DataStoreType - * @enum {number} - * @property {number} DATA_STORE_TYPE_UNSPECIFIED=0 DATA_STORE_TYPE_UNSPECIFIED value - * @property {number} PUBLIC_WEB=1 PUBLIC_WEB value - * @property {number} UNSTRUCTURED=2 UNSTRUCTURED value - * @property {number} STRUCTURED=3 STRUCTURED value - */ - v3beta1.DataStoreType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_STORE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PUBLIC_WEB"] = 1; - values[valuesById[2] = "UNSTRUCTURED"] = 2; - values[valuesById[3] = "STRUCTURED"] = 3; - return values; + return TransitionRoute; })(); - v3beta1.Fulfillment = (function() { + v3beta1.ListPagesRequest = (function() { /** - * Properties of a Fulfillment. + * Properties of a ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IFulfillment - * @property {Array.|null} [messages] Fulfillment messages - * @property {string|null} [webhook] Fulfillment webhook - * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses - * @property {string|null} [tag] Fulfillment tag - * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions - * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases - * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Fulfillment advancedSettings - * @property {boolean|null} [enableGenerativeFallback] Fulfillment enableGenerativeFallback + * @interface IListPagesRequest + * @property {string|null} [parent] ListPagesRequest parent + * @property {string|null} [languageCode] ListPagesRequest languageCode + * @property {number|null} [pageSize] ListPagesRequest pageSize + * @property {string|null} [pageToken] ListPagesRequest pageToken */ /** - * Constructs a new Fulfillment. + * Constructs a new ListPagesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Fulfillment. - * @implements IFulfillment + * @classdesc Represents a ListPagesRequest. + * @implements IListPagesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set */ - function Fulfillment(properties) { - this.messages = []; - this.setParameterActions = []; - this.conditionalCases = []; + function ListPagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98222,182 +101675,364 @@ } /** - * Fulfillment messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - Fulfillment.prototype.messages = $util.emptyArray; + ListPagesRequest.prototype.parent = ""; /** - * Fulfillment webhook. - * @member {string} webhook - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - Fulfillment.prototype.webhook = ""; + ListPagesRequest.prototype.languageCode = ""; /** - * Fulfillment returnPartialResponses. - * @member {boolean} returnPartialResponses - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - Fulfillment.prototype.returnPartialResponses = false; + ListPagesRequest.prototype.pageSize = 0; /** - * Fulfillment tag. - * @member {string} tag - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance */ - Fulfillment.prototype.tag = ""; + ListPagesRequest.prototype.pageToken = ""; /** - * Fulfillment setParameterActions. - * @member {Array.} setParameterActions - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @instance + * Creates a new ListPagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest instance */ - Fulfillment.prototype.setParameterActions = $util.emptyArray; + ListPagesRequest.create = function create(properties) { + return new ListPagesRequest(properties); + }; /** - * Fulfillment conditionalCases. - * @member {Array.} conditionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * Encodes the specified ListPagesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesRequest.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 ListPagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesRequest} message ListPagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 ListPagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPagesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPagesRequest.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 ListPagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} ListPagesRequest + */ + ListPagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest(); + 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 ListPagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesRequest} message ListPagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPagesRequest.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 ListPagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest * @instance + * @returns {Object.} JSON object */ - Fulfillment.prototype.conditionalCases = $util.emptyArray; + ListPagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Fulfillment advancedSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * Gets the default type url for ListPagesRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesRequest"; + }; + + return ListPagesRequest; + })(); + + v3beta1.ListPagesResponse = (function() { + + /** + * Properties of a ListPagesResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListPagesResponse + * @property {Array.|null} [pages] ListPagesResponse pages + * @property {string|null} [nextPageToken] ListPagesResponse nextPageToken + */ + + /** + * Constructs a new ListPagesResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListPagesResponse. + * @implements IListPagesResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + */ + function ListPagesResponse(properties) { + this.pages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPagesResponse pages. + * @member {Array.} pages + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance */ - Fulfillment.prototype.advancedSettings = null; + ListPagesResponse.prototype.pages = $util.emptyArray; /** - * Fulfillment enableGenerativeFallback. - * @member {boolean} enableGenerativeFallback - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * ListPagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance */ - Fulfillment.prototype.enableGenerativeFallback = false; + ListPagesResponse.prototype.nextPageToken = ""; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new ListPagesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse instance */ - Fulfillment.create = function create(properties) { - return new Fulfillment(properties); + ListPagesResponse.create = function create(properties) { + return new ListPagesResponse(properties); }; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified ListPagesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encode = function encode(message, writer) { + ListPagesResponse.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.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.setParameterActions != null && message.setParameterActions.length) - for (var i = 0; i < message.setParameterActions.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.conditionalCases != null && message.conditionalCases.length) - for (var i = 0; i < message.conditionalCases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); - if (message.enableGenerativeFallback != null && Object.hasOwnProperty.call(message, "enableGenerativeFallback")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.enableGenerativeFallback); + if (message.pages != null && message.pages.length) + for (var i = 0; i < message.pages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.pages[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 Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * Encodes the specified ListPagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListPagesResponse} message ListPagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + ListPagesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes a ListPagesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decode = function decode(reader, length) { + ListPagesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); + if (!(message.pages && message.pages.length)) + message.pages = []; + message.pages.push($root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32())); break; } case 2: { - message.webhook = reader.string(); - break; - } - case 8: { - message.returnPartialResponses = reader.bool(); - break; - } - case 3: { - message.tag = reader.string(); - break; - } - case 4: { - if (!(message.setParameterActions && message.setParameterActions.length)) - message.setParameterActions = []; - message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.conditionalCases && message.conditionalCases.length)) - message.conditionalCases = []; - message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); - break; - } - case 7: { - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); - break; - } - case 12: { - message.enableGenerativeFallback = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -98409,1213 +102044,377 @@ }; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes a ListPagesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fulfillment.decodeDelimited = function decodeDelimited(reader) { + ListPagesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fulfillment message. + * Verifies a ListPagesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fulfillment.verify = function verify(message) { + ListPagesResponse.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.v3beta1.ResponseMessage.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - if (!$util.isString(message.webhook)) - return "webhook: string expected"; - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - if (typeof message.returnPartialResponses !== "boolean") - return "returnPartialResponses: boolean expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; - if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { - if (!Array.isArray(message.setParameterActions)) - return "setParameterActions: array expected"; - for (var i = 0; i < message.setParameterActions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); - if (error) - return "setParameterActions." + error; - } - } - if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { - if (!Array.isArray(message.conditionalCases)) - return "conditionalCases: array expected"; - for (var i = 0; i < message.conditionalCases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); + if (message.pages != null && message.hasOwnProperty("pages")) { + if (!Array.isArray(message.pages)) + return "pages: array expected"; + for (var i = 0; i < message.pages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.pages[i]); if (error) - return "conditionalCases." + error; + return "pages." + error; } } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); - if (error) - return "advancedSettings." + error; - } - if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) - if (typeof message.enableGenerativeFallback !== "boolean") - return "enableGenerativeFallback: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates a ListPagesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} ListPagesResponse */ - Fulfillment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) + ListPagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.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.v3beta1.Fulfillment.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); - } - } - if (object.webhook != null) - message.webhook = String(object.webhook); - if (object.returnPartialResponses != null) - message.returnPartialResponses = Boolean(object.returnPartialResponses); - if (object.tag != null) - message.tag = String(object.tag); - if (object.setParameterActions) { - if (!Array.isArray(object.setParameterActions)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); - message.setParameterActions = []; - for (var i = 0; i < object.setParameterActions.length; ++i) { - if (typeof object.setParameterActions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); - message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); - } - } - if (object.conditionalCases) { - if (!Array.isArray(object.conditionalCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); - message.conditionalCases = []; - for (var i = 0; i < object.conditionalCases.length; ++i) { - if (typeof object.conditionalCases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); - message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse(); + if (object.pages) { + if (!Array.isArray(object.pages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: array expected"); + message.pages = []; + for (var i = 0; i < object.pages.length; ++i) { + if (typeof object.pages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages: object expected"); + message.pages[i] = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.pages[i]); } } - if (object.advancedSettings != null) { - if (typeof object.advancedSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.advancedSettings: object expected"); - message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); - } - if (object.enableGenerativeFallback != null) - message.enableGenerativeFallback = Boolean(object.enableGenerativeFallback); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * Creates a plain object from a ListPagesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment + * @param {google.cloud.dialogflow.cx.v3beta1.ListPagesResponse} message ListPagesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fulfillment.toObject = function toObject(message, options) { + ListPagesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.setParameterActions = []; - object.conditionalCases = []; - } - if (options.defaults) { - object.webhook = ""; - object.tag = ""; - object.advancedSettings = null; - object.returnPartialResponses = false; - object.enableGenerativeFallback = false; - } - 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.v3beta1.ResponseMessage.toObject(message.messages[j], options); - } - if (message.webhook != null && message.hasOwnProperty("webhook")) - object.webhook = message.webhook; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.setParameterActions && message.setParameterActions.length) { - object.setParameterActions = []; - for (var j = 0; j < message.setParameterActions.length; ++j) - object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); - } - if (message.conditionalCases && message.conditionalCases.length) { - object.conditionalCases = []; - for (var j = 0; j < message.conditionalCases.length; ++j) - object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + if (options.arrays || options.defaults) + object.pages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.pages && message.pages.length) { + object.pages = []; + for (var j = 0; j < message.pages.length; ++j) + object.pages[j] = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.pages[j], options); } - if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) - object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); - if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) - object.returnPartialResponses = message.returnPartialResponses; - if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) - object.enableGenerativeFallback = message.enableGenerativeFallback; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Fulfillment to JSON. + * Converts this ListPagesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @instance * @returns {Object.} JSON object */ - Fulfillment.prototype.toJSON = function toJSON() { + ListPagesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Fulfillment + * Gets the default type url for ListPagesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.ListPagesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListPagesResponse"; }; - Fulfillment.SetParameterAction = (function() { + return ListPagesResponse; + })(); - /** - * Properties of a SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface ISetParameterAction - * @property {string|null} [parameter] SetParameterAction parameter - * @property {google.protobuf.IValue|null} [value] SetParameterAction value - */ + v3beta1.GetPageRequest = (function() { - /** - * Constructs a new SetParameterAction. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a SetParameterAction. - * @implements ISetParameterAction - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - */ - function SetParameterAction(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 GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetPageRequest + * @property {string|null} [name] GetPageRequest name + * @property {string|null} [languageCode] GetPageRequest languageCode + */ - /** - * SetParameterAction parameter. - * @member {string} parameter - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.parameter = ""; + /** + * Constructs a new GetPageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetPageRequest. + * @implements IGetPageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + */ + function GetPageRequest(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]]; + } - /** - * SetParameterAction value. - * @member {google.protobuf.IValue|null|undefined} value - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - */ - SetParameterAction.prototype.value = null; + /** + * GetPageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + */ + GetPageRequest.prototype.name = ""; - /** - * Creates a new SetParameterAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance - */ - SetParameterAction.create = function create(properties) { - return new SetParameterAction(properties); - }; + /** + * GetPageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + */ + GetPageRequest.prototype.languageCode = ""; - /** - * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new GetPageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest instance + */ + GetPageRequest.create = function create(properties) { + return new GetPageRequest(properties); + }; - /** - * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetPageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPageRequest.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; + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parameter = reader.string(); - break; - } - case 2: { - message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetPageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetPageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetPageRequest} message GetPageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; - }; + } + return message; + }; - /** - * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetParameterAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GetPageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SetParameterAction message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetParameterAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameter != null && message.hasOwnProperty("parameter")) - if (!$util.isString(message.parameter)) - return "parameter: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.protobuf.Value.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction - */ - SetParameterAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); - if (object.parameter != null) - message.parameter = String(object.parameter); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); - message.value = $root.google.protobuf.Value.fromObject(object.value); - } - return message; - }; + /** + * Verifies a GetPageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPageRequest.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 plain object from a SetParameterAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetParameterAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parameter = ""; - object.value = null; - } - if (message.parameter != null && message.hasOwnProperty("parameter")) - object.parameter = message.parameter; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.protobuf.Value.toObject(message.value, options); + /** + * Creates a GetPageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} GetPageRequest + */ + GetPageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest) return object; - }; - - /** - * Converts this SetParameterAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @instance - * @returns {Object.} JSON object - */ - SetParameterAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetParameterAction - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction"; - }; - - return SetParameterAction; - })(); - - Fulfillment.ConditionalCases = (function() { - - /** - * Properties of a ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @interface IConditionalCases - * @property {Array.|null} [cases] ConditionalCases cases - */ + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetPageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Constructs a new ConditionalCases. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment - * @classdesc Represents a ConditionalCases. - * @implements IConditionalCases - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - */ - function ConditionalCases(properties) { - this.cases = []; - if (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 GetPageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GetPageRequest} message GetPageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPageRequest.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; + }; - /** - * ConditionalCases cases. - * @member {Array.} cases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - */ - ConditionalCases.prototype.cases = $util.emptyArray; - - /** - * Creates a new ConditionalCases instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance - */ - ConditionalCases.create = function create(properties) { - return new ConditionalCases(properties); - }; - - /** - * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cases != null && message.cases.length) - for (var i = 0; i < message.cases.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConditionalCases message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.cases && message.cases.length)) - message.cases = []; - message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConditionalCases.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConditionalCases message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConditionalCases.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cases != null && message.hasOwnProperty("cases")) { - if (!Array.isArray(message.cases)) - return "cases: array expected"; - for (var i = 0; i < message.cases.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); - if (error) - return "cases." + error; - } - } - return null; - }; - - /** - * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases - */ - ConditionalCases.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); - if (object.cases) { - if (!Array.isArray(object.cases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); - message.cases = []; - for (var i = 0; i < object.cases.length; ++i) { - if (typeof object.cases[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); - message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConditionalCases.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cases = []; - if (message.cases && message.cases.length) { - object.cases = []; - for (var j = 0; j < message.cases.length; ++j) - object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); - } - return object; - }; - - /** - * Converts this ConditionalCases to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @instance - * @returns {Object.} JSON object - */ - ConditionalCases.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConditionalCases - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases"; - }; - - ConditionalCases.Case = (function() { - - /** - * Properties of a Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @interface ICase - * @property {string|null} [condition] Case condition - * @property {Array.|null} [caseContent] Case caseContent - */ - - /** - * Constructs a new Case. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases - * @classdesc Represents a Case. - * @implements ICase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - */ - function Case(properties) { - this.caseContent = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Case condition. - * @member {string} condition - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.condition = ""; - - /** - * Case caseContent. - * @member {Array.} caseContent - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - */ - Case.prototype.caseContent = $util.emptyArray; - - /** - * Creates a new Case instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance - */ - Case.create = function create(properties) { - return new Case(properties); - }; - - /** - * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.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.caseContent != null && message.caseContent.length) - for (var i = 0; i < message.caseContent.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Case.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Case message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.condition = reader.string(); - break; - } - case 2: { - if (!(message.caseContent && message.caseContent.length)) - message.caseContent = []; - message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Case message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Case.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Case message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Case.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.caseContent != null && message.hasOwnProperty("caseContent")) { - if (!Array.isArray(message.caseContent)) - return "caseContent: array expected"; - for (var i = 0; i < message.caseContent.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); - if (error) - return "caseContent." + error; - } - } - return null; - }; - - /** - * Creates a Case message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case - */ - Case.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); - if (object.condition != null) - message.condition = String(object.condition); - if (object.caseContent) { - if (!Array.isArray(object.caseContent)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); - message.caseContent = []; - for (var i = 0; i < object.caseContent.length; ++i) { - if (typeof object.caseContent[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); - message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Case message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Case.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.caseContent = []; - if (options.defaults) - object.condition = ""; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = message.condition; - if (message.caseContent && message.caseContent.length) { - object.caseContent = []; - for (var j = 0; j < message.caseContent.length; ++j) - object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); - } - return object; - }; - - /** - * Converts this Case to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @instance - * @returns {Object.} JSON object - */ - Case.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Case - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case"; - }; - - Case.CaseContent = (function() { - - /** - * Properties of a CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @interface ICaseContent - * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message - * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases - */ - - /** - * Constructs a new CaseContent. - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case - * @classdesc Represents a CaseContent. - * @implements ICaseContent - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - */ - function CaseContent(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]]; - } - - /** - * CaseContent message. - * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.message = null; - - /** - * CaseContent additionalCases. - * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - CaseContent.prototype.additionalCases = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CaseContent casesOrMessage. - * @member {"message"|"additionalCases"|undefined} casesOrMessage - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - */ - Object.defineProperty(CaseContent.prototype, "casesOrMessage", { - get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CaseContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance - */ - CaseContent.create = function create(properties) { - return new CaseContent(properties); - }; - - /** - * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) - $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CaseContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); - break; - } - case 2: { - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CaseContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CaseContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CaseContent message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CaseContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) { - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); - if (error) - return "message." + error; - } - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - if (properties.casesOrMessage === 1) - return "casesOrMessage: multiple values"; - properties.casesOrMessage = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); - if (error) - return "additionalCases." + error; - } - } - return null; - }; - - /** - * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent - */ - CaseContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); - message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); - } - if (object.additionalCases != null) { - if (typeof object.additionalCases !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); - message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); - } - return message; - }; - - /** - * Creates a plain object from a CaseContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CaseContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.message != null && message.hasOwnProperty("message")) { - object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); - if (options.oneofs) - object.casesOrMessage = "message"; - } - if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { - object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); - if (options.oneofs) - object.casesOrMessage = "additionalCases"; - } - return object; - }; - - /** - * Converts this CaseContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @instance - * @returns {Object.} JSON object - */ - CaseContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CaseContent - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent"; - }; - - return CaseContent; - })(); - - return Case; - })(); + /** + * Converts this GetPageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @instance + * @returns {Object.} JSON object + */ + GetPageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConditionalCases; - })(); + /** + * Gets the default type url for GetPageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.GetPageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetPageRequest"; + }; - return Fulfillment; + return GetPageRequest; })(); - v3beta1.ResponseMessage = (function() { + v3beta1.CreatePageRequest = (function() { /** - * Properties of a ResponseMessage. + * Properties of a CreatePageRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IResponseMessage - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text - * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall - * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null} [knowledgeInfoCard] ResponseMessage knowledgeInfoCard - * @property {string|null} [channel] ResponseMessage channel + * @interface ICreatePageRequest + * @property {string|null} [parent] CreatePageRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] CreatePageRequest page + * @property {string|null} [languageCode] CreatePageRequest languageCode */ /** - * Constructs a new ResponseMessage. + * Constructs a new CreatePageRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ResponseMessage. - * @implements IResponseMessage + * @classdesc Represents a CreatePageRequest. + * @implements ICreatePageRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set */ - function ResponseMessage(properties) { + function CreatePageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99623,229 +102422,358 @@ } /** - * ResponseMessage text. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * CreatePageRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest * @instance */ - ResponseMessage.prototype.text = null; + CreatePageRequest.prototype.parent = ""; /** - * ResponseMessage payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * CreatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest * @instance */ - ResponseMessage.prototype.payload = null; + CreatePageRequest.prototype.page = null; /** - * ResponseMessage conversationSuccess. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * CreatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest * @instance */ - ResponseMessage.prototype.conversationSuccess = null; + CreatePageRequest.prototype.languageCode = ""; /** - * ResponseMessage outputAudioText. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Creates a new CreatePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest instance */ - ResponseMessage.prototype.outputAudioText = null; + CreatePageRequest.create = function create(properties) { + return new CreatePageRequest(properties); + }; /** - * ResponseMessage liveAgentHandoff. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Encodes the specified CreatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ResponseMessage.prototype.liveAgentHandoff = null; + CreatePageRequest.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.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, 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; + }; /** - * ResponseMessage endInteraction. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Encodes the specified CreatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreatePageRequest} message CreatePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ResponseMessage.prototype.endInteraction = null; + CreatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ResponseMessage playAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Decodes a CreatePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.prototype.playAudio = null; + CreatePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ResponseMessage mixedAudio. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Decodes a CreatePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.prototype.mixedAudio = null; + CreatePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ResponseMessage telephonyTransferCall. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @instance + * Verifies a CreatePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.prototype.telephonyTransferCall = null; + CreatePageRequest.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.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; /** - * ResponseMessage knowledgeInfoCard. - * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null|undefined} knowledgeInfoCard - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Creates a CreatePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} CreatePageRequest + */ + CreatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreatePageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a CreatePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CreatePageRequest} message CreatePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.page = null; + object.languageCode = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this CreatePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest * @instance + * @returns {Object.} JSON object */ - ResponseMessage.prototype.knowledgeInfoCard = null; + CreatePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ResponseMessage channel. - * @member {string} channel - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * Gets the default type url for CreatePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreatePageRequest"; + }; + + return CreatePageRequest; + })(); + + v3beta1.UpdatePageRequest = (function() { + + /** + * Properties of an UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdatePageRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] UpdatePageRequest page + * @property {string|null} [languageCode] UpdatePageRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePageRequest updateMask + */ + + /** + * Constructs a new UpdatePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdatePageRequest. + * @implements IUpdatePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + */ + function UpdatePageRequest(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]]; + } + + /** + * UpdatePageRequest page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @instance */ - ResponseMessage.prototype.channel = ""; + UpdatePageRequest.prototype.page = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UpdatePageRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + * @instance + */ + UpdatePageRequest.prototype.languageCode = ""; /** - * ResponseMessage message. - * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"|undefined} message - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * UpdatePageRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @instance */ - Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall", "knowledgeInfoCard"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdatePageRequest.prototype.updateMask = null; /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new UpdatePageRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest instance */ - ResponseMessage.create = function create(properties) { - return new ResponseMessage(properties); + UpdatePageRequest.create = function create(properties) { + return new UpdatePageRequest(properties); }; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified UpdatePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encode = function encode(message, writer) { + UpdatePageRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); - if (message.knowledgeInfoCard != null && Object.hasOwnProperty.call(message, "knowledgeInfoCard")) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.encode(message.knowledgeInfoCard, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.Page.encode(message.page, 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 ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified UpdatePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdatePageRequest} message UpdatePageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes an UpdatePageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decode = function decode(reader, length) { + UpdatePageRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); break; } case 2: { - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 9: { - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); - break; - } - case 8: { - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); - break; - } - case 10: { - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); - break; - } - case 11: { - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); - break; - } - case 12: { - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); - break; - } - case 13: { - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); - break; - } - case 18: { - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); - break; - } - case 20: { - message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.decode(reader, reader.uint32()); + message.languageCode = reader.string(); break; } - case 19: { - message.channel = reader.string(); + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -99857,1250 +102785,1431 @@ }; /** - * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. + * Decodes an UpdatePageRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseMessage.decodeDelimited = function decodeDelimited(reader) { + UpdatePageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMessage message. + * Verifies an UpdatePageRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResponseMessage.verify = function verify(message) { + UpdatePageRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.payload != null && message.hasOwnProperty("payload")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.protobuf.Struct.verify(message.payload); - if (error) - return "payload." + error; - } - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); - if (error) - return "conversationSuccess." + error; - } - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); - if (error) - return "outputAudioText." + error; - } - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); - if (error) - return "liveAgentHandoff." + error; - } - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); - if (error) - return "endInteraction." + error; - } - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); - if (error) - return "playAudio." + error; - } - } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); - if (error) - return "mixedAudio." + error; - } - } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); - if (error) - return "telephonyTransferCall." + error; - } + if (message.page != null && message.hasOwnProperty("page")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Page.verify(message.page); + if (error) + return "page." + error; } - if (message.knowledgeInfoCard != null && message.hasOwnProperty("knowledgeInfoCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify(message.knowledgeInfoCard); - if (error) - return "knowledgeInfoCard." + 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; } - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; return null; }; /** - * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePageRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} UpdatePageRequest */ - ResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) + UpdatePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); - message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.conversationSuccess != null) { - if (typeof object.conversationSuccess !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); - message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); - } - if (object.outputAudioText != null) { - if (typeof object.outputAudioText !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); - message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); - } - if (object.liveAgentHandoff != null) { - if (typeof object.liveAgentHandoff !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); - message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); - } - if (object.endInteraction != null) { - if (typeof object.endInteraction !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); - message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); - } - if (object.playAudio != null) { - if (typeof object.playAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); - message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); - } - if (object.mixedAudio != null) { - if (typeof object.mixedAudio !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); - message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); - } - if (object.telephonyTransferCall != null) { - if (typeof object.telephonyTransferCall !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.telephonyTransferCall: object expected"); - message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); } - if (object.knowledgeInfoCard != null) { - if (typeof object.knowledgeInfoCard !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.knowledgeInfoCard: object expected"); - message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.fromObject(object.knowledgeInfoCard); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.channel != null) - message.channel = String(object.channel); return message; }; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePageRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage + * @param {google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest} message UpdatePageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMessage.toObject = function toObject(message, options) { + UpdatePageRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.channel = ""; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); - if (options.oneofs) - object.message = "text"; - } - if (message.payload != null && message.hasOwnProperty("payload")) { - object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); - if (options.oneofs) - object.message = "payload"; - } - if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { - object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); - if (options.oneofs) - object.message = "outputAudioText"; - } - if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { - object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); - if (options.oneofs) - object.message = "conversationSuccess"; - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); - if (options.oneofs) - object.message = "liveAgentHandoff"; - } - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { - object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); - if (options.oneofs) - object.message = "endInteraction"; - } - if (message.playAudio != null && message.hasOwnProperty("playAudio")) { - object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); - if (options.oneofs) - object.message = "playAudio"; - } - if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { - object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); - if (options.oneofs) - object.message = "mixedAudio"; - } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); - if (options.oneofs) - object.message = "telephonyTransferCall"; - } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - if (message.knowledgeInfoCard != null && message.hasOwnProperty("knowledgeInfoCard")) { - object.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.toObject(message.knowledgeInfoCard, options); - if (options.oneofs) - object.message = "knowledgeInfoCard"; + if (options.defaults) { + object.page = null; + object.languageCode = ""; + object.updateMask = null; } + if (message.page != null && message.hasOwnProperty("page")) + object.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.toObject(message.page, 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 ResponseMessage to JSON. + * Converts this UpdatePageRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @instance * @returns {Object.} JSON object */ - ResponseMessage.prototype.toJSON = function toJSON() { + UpdatePageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResponseMessage + * Gets the default type url for UpdatePageRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdatePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest"; }; - ResponseMessage.Text = (function() { + return UpdatePageRequest; + })(); - /** - * Properties of a Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IText - * @property {Array.|null} [text] Text text - * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption - */ + v3beta1.DeletePageRequest = (function() { - /** - * Constructs a new Text. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set - */ - function Text(properties) { - this.text = []; - if (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 DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeletePageRequest + * @property {string|null} [name] DeletePageRequest name + * @property {boolean|null} [force] DeletePageRequest force + */ - /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - */ - Text.prototype.text = $util.emptyArray; + /** + * Constructs a new DeletePageRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeletePageRequest. + * @implements IDeletePageRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + */ + function DeletePageRequest(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]]; + } - /** - * Text allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - */ - Text.prototype.allowPlaybackInterruption = false; + /** + * DeletePageRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.name = ""; - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; + /** + * DeletePageRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + */ + DeletePageRequest.prototype.force = false; - /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Creates a new DeletePageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest instance + */ + DeletePageRequest.create = function create(properties) { + return new DeletePageRequest(properties); + }; - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Text.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeletePageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.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; + }; - /** - * Decodes a Text message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); - break; - } - case 2: { - message.allowPlaybackInterruption = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified DeletePageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeletePageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeletePageRequest} message DeletePageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Text.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Text message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Text.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; - } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; + /** + * Decodes a DeletePageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; + /** + * Verifies a DeletePageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePageRequest.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 plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Text.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.text = []; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; - } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + /** + * Creates a DeletePageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} DeletePageRequest + */ + DeletePageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest) return object; - }; - - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Text - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text"; - }; - - return Text; - })(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeletePageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; - ResponseMessage.LiveAgentHandoff = (function() { + /** + * Creates a plain object from a DeletePageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeletePageRequest} message DeletePageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePageRequest.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; + }; - /** - * Properties of a LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface ILiveAgentHandoff - * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata - */ + /** + * Converts this DeletePageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new LiveAgentHandoff. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a LiveAgentHandoff. - * @implements ILiveAgentHandoff - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - */ - function LiveAgentHandoff(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 DeletePageRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeletePageRequest"; + }; - /** - * LiveAgentHandoff metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @instance - */ - LiveAgentHandoff.prototype.metadata = null; - - /** - * Creates a new LiveAgentHandoff instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance - */ - LiveAgentHandoff.create = function create(properties) { - return new LiveAgentHandoff(properties); - }; - - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveAgentHandoff.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveAgentHandoff.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return DeletePageRequest; + })(); - /** - * Verifies a LiveAgentHandoff message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LiveAgentHandoff.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; + v3beta1.KnowledgeConnectorSettings = (function() { - /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - */ - LiveAgentHandoff.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - return message; - }; + /** + * Properties of a KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IKnowledgeConnectorSettings + * @property {boolean|null} [enabled] KnowledgeConnectorSettings enabled + * @property {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null} [triggerFulfillment] KnowledgeConnectorSettings triggerFulfillment + * @property {string|null} [targetPage] KnowledgeConnectorSettings targetPage + * @property {string|null} [targetFlow] KnowledgeConnectorSettings targetFlow + * @property {Array.|null} [dataStoreConnections] KnowledgeConnectorSettings dataStoreConnections + */ - /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LiveAgentHandoff.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - return object; - }; + /** + * Constructs a new KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a KnowledgeConnectorSettings. + * @implements IKnowledgeConnectorSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings=} [properties] Properties to set + */ + function KnowledgeConnectorSettings(properties) { + this.dataStoreConnections = []; + if (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 LiveAgentHandoff to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @instance - * @returns {Object.} JSON object - */ - LiveAgentHandoff.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * KnowledgeConnectorSettings enabled. + * @member {boolean} enabled + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.enabled = false; - /** - * Gets the default type url for LiveAgentHandoff - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff"; - }; + /** + * KnowledgeConnectorSettings triggerFulfillment. + * @member {google.cloud.dialogflow.cx.v3beta1.IFulfillment|null|undefined} triggerFulfillment + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.triggerFulfillment = null; - return LiveAgentHandoff; - })(); + /** + * KnowledgeConnectorSettings targetPage. + * @member {string|null|undefined} targetPage + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.targetPage = null; - ResponseMessage.ConversationSuccess = (function() { + /** + * KnowledgeConnectorSettings targetFlow. + * @member {string|null|undefined} targetFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.targetFlow = null; - /** - * Properties of a ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IConversationSuccess - * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata - */ + /** + * KnowledgeConnectorSettings dataStoreConnections. + * @member {Array.} dataStoreConnections + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.dataStoreConnections = $util.emptyArray; - /** - * Constructs a new ConversationSuccess. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a ConversationSuccess. - * @implements IConversationSuccess - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - */ - function ConversationSuccess(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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ConversationSuccess metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - */ - ConversationSuccess.prototype.metadata = null; + /** + * KnowledgeConnectorSettings target. + * @member {"targetPage"|"targetFlow"|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + */ + Object.defineProperty(KnowledgeConnectorSettings.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["targetPage", "targetFlow"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new ConversationSuccess instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance - */ - ConversationSuccess.create = function create(properties) { - return new ConversationSuccess(properties); - }; + /** + * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IKnowledgeConnectorSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance + */ + KnowledgeConnectorSettings.create = function create(properties) { + return new KnowledgeConnectorSettings(properties); + }; - /** - * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.triggerFulfillment != null && Object.hasOwnProperty.call(message, "triggerFulfillment")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.encode(message.triggerFulfillment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetPage != null && Object.hasOwnProperty.call(message, "targetPage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetPage); + if (message.targetFlow != null && Object.hasOwnProperty.call(message, "targetFlow")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetFlow); + if (message.dataStoreConnections != null && message.dataStoreConnections.length) + for (var i = 0; i < message.dataStoreConnections.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.encode(message.dataStoreConnections[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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 ConversationSuccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 3: { + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.targetPage = reader.string(); + break; + } + case 5: { + message.targetFlow = reader.string(); + break; + } + case 6: { + if (!(message.dataStoreConnections && message.dataStoreConnections.length)) + message.dataStoreConnections = []; + message.dataStoreConnections.push($root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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 ConversationSuccess message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); + /** + * Verifies a KnowledgeConnectorSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify(message.triggerFulfillment); + if (error) + return "triggerFulfillment." + error; + } + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + properties.target = 1; + if (!$util.isString(message.targetPage)) + return "targetPage: string expected"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (!$util.isString(message.targetFlow)) + return "targetFlow: string 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.v3beta1.DataStoreConnection.verify(message.dataStoreConnections[i]); if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess - */ - ConversationSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + return "dataStoreConnections." + error; } - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + /** + * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings} KnowledgeConnectorSettings + */ + KnowledgeConnectorSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings) return object; - }; - - /** - * Converts this ConversationSuccess to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @instance - * @returns {Object.} JSON object - */ - ConversationSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConversationSuccess - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.triggerFulfillment != null) { + if (typeof object.triggerFulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.triggerFulfillment: object expected"); + message.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.fromObject(object.triggerFulfillment); + } + if (object.targetPage != null) + message.targetPage = String(object.targetPage); + if (object.targetFlow != null) + message.targetFlow = String(object.targetFlow); + if (object.dataStoreConnections) { + if (!Array.isArray(object.dataStoreConnections)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.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.v3beta1.KnowledgeConnectorSettings.dataStoreConnections: object expected"); + message.dataStoreConnections[i] = $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.fromObject(object.dataStoreConnections[i]); } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess"; - }; - - return ConversationSuccess; - })(); + } + return message; + }; - ResponseMessage.OutputAudioText = (function() { + /** + * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.arrays || options.defaults) + object.dataStoreConnections = []; + if (options.defaults) { + object.enabled = false; + object.triggerFulfillment = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.triggerFulfillment != null && message.hasOwnProperty("triggerFulfillment")) + object.triggerFulfillment = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.toObject(message.triggerFulfillment, options); + if (message.targetPage != null && message.hasOwnProperty("targetPage")) { + object.targetPage = message.targetPage; + if (options.oneofs) + object.target = "targetPage"; + } + if (message.targetFlow != null && message.hasOwnProperty("targetFlow")) { + object.targetFlow = message.targetFlow; + if (options.oneofs) + object.target = "targetFlow"; + } + 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.v3beta1.DataStoreConnection.toObject(message.dataStoreConnections[j], options); + } + return object; + }; - /** - * Properties of an OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IOutputAudioText - * @property {string|null} [text] OutputAudioText text - * @property {string|null} [ssml] OutputAudioText ssml - * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption - */ + /** + * Converts this KnowledgeConnectorSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings + * @instance + * @returns {Object.} JSON object + */ + KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new OutputAudioText. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an OutputAudioText. - * @implements IOutputAudioText - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - */ - function OutputAudioText(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 KnowledgeConnectorSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.KnowledgeConnectorSettings"; + }; - /** - * OutputAudioText text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.text = null; + return KnowledgeConnectorSettings; + })(); - /** - * OutputAudioText ssml. - * @member {string|null|undefined} ssml - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.ssml = null; + v3beta1.DataStoreConnection = (function() { - /** - * OutputAudioText allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - OutputAudioText.prototype.allowPlaybackInterruption = false; + /** + * Properties of a DataStoreConnection. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDataStoreConnection + * @property {google.cloud.dialogflow.cx.v3beta1.DataStoreType|null} [dataStoreType] DataStoreConnection dataStoreType + * @property {string|null} [dataStore] DataStoreConnection dataStore + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new DataStoreConnection. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DataStoreConnection. + * @implements IDataStoreConnection + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection=} [properties] Properties to set + */ + function DataStoreConnection(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]]; + } - /** - * OutputAudioText source. - * @member {"text"|"ssml"|undefined} source - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - */ - Object.defineProperty(OutputAudioText.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * DataStoreConnection dataStoreType. + * @member {google.cloud.dialogflow.cx.v3beta1.DataStoreType} dataStoreType + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @instance + */ + DataStoreConnection.prototype.dataStoreType = 0; - /** - * Creates a new OutputAudioText instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance - */ - OutputAudioText.create = function create(properties) { - return new OutputAudioText(properties); - }; + /** + * DataStoreConnection dataStore. + * @member {string} dataStore + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @instance + */ + DataStoreConnection.prototype.dataStore = ""; - /** - * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.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.ssml != null && Object.hasOwnProperty.call(message, "ssml")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); - return writer; - }; + /** + * Creates a new DataStoreConnection instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection instance + */ + DataStoreConnection.create = function create(properties) { + return new DataStoreConnection(properties); + }; - /** - * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DataStoreConnection message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection} message DataStoreConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStoreConnection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStoreType != null && Object.hasOwnProperty.call(message, "dataStoreType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataStoreType); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataStore); + return writer; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.ssml = reader.string(); - break; - } - case 3: { - message.allowPlaybackInterruption = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified DataStoreConnection message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDataStoreConnection} message DataStoreConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStoreConnection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataStoreConnection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStoreConnection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataStoreType = reader.int32(); + break; + } + case 2: { + message.dataStore = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudioText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DataStoreConnection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStoreConnection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an OutputAudioText message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OutputAudioText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.source = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.ssml)) - return "ssml: string expected"; + /** + * Verifies a DataStoreConnection message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataStoreConnection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStoreType != null && message.hasOwnProperty("dataStoreType")) + switch (message.dataStoreType) { + default: + return "dataStoreType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; - return null; - }; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + return null; + }; - /** - * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText - */ - OutputAudioText.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); - if (object.text != null) - message.text = String(object.text); - if (object.ssml != null) - message.ssml = String(object.ssml); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); - return message; - }; + /** + * Creates a DataStoreConnection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} DataStoreConnection + */ + DataStoreConnection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection(); + switch (object.dataStoreType) { + default: + if (typeof object.dataStoreType === "number") { + message.dataStoreType = object.dataStoreType; + break; + } + break; + case "DATA_STORE_TYPE_UNSPECIFIED": + case 0: + message.dataStoreType = 0; + break; + case "PUBLIC_WEB": + case 1: + message.dataStoreType = 1; + break; + case "UNSTRUCTURED": + case 2: + message.dataStoreType = 2; + break; + case "STRUCTURED": + case 3: + message.dataStoreType = 3; + break; + } + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + return message; + }; - /** - * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OutputAudioText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowPlaybackInterruption = false; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.source = "text"; + /** + * Creates a plain object from a DataStoreConnection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DataStoreConnection} message DataStoreConnection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataStoreConnection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataStoreType = options.enums === String ? "DATA_STORE_TYPE_UNSPECIFIED" : 0; + object.dataStore = ""; + } + if (message.dataStoreType != null && message.hasOwnProperty("dataStoreType")) + object.dataStoreType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.DataStoreType[message.dataStoreType] === undefined ? message.dataStoreType : $root.google.cloud.dialogflow.cx.v3beta1.DataStoreType[message.dataStoreType] : message.dataStoreType; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; + return object; + }; + + /** + * Converts this DataStoreConnection to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @instance + * @returns {Object.} JSON object + */ + DataStoreConnection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataStoreConnection + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.DataStoreConnection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataStoreConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DataStoreConnection"; + }; + + return DataStoreConnection; + })(); + + /** + * DataStoreType enum. + * @name google.cloud.dialogflow.cx.v3beta1.DataStoreType + * @enum {number} + * @property {number} DATA_STORE_TYPE_UNSPECIFIED=0 DATA_STORE_TYPE_UNSPECIFIED value + * @property {number} PUBLIC_WEB=1 PUBLIC_WEB value + * @property {number} UNSTRUCTURED=2 UNSTRUCTURED value + * @property {number} STRUCTURED=3 STRUCTURED value + */ + v3beta1.DataStoreType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_STORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUBLIC_WEB"] = 1; + values[valuesById[2] = "UNSTRUCTURED"] = 2; + values[valuesById[3] = "STRUCTURED"] = 3; + return values; + })(); + + v3beta1.Fulfillment = (function() { + + /** + * Properties of a Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IFulfillment + * @property {Array.|null} [messages] Fulfillment messages + * @property {string|null} [webhook] Fulfillment webhook + * @property {boolean|null} [returnPartialResponses] Fulfillment returnPartialResponses + * @property {string|null} [tag] Fulfillment tag + * @property {Array.|null} [setParameterActions] Fulfillment setParameterActions + * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases + * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Fulfillment advancedSettings + * @property {boolean|null} [enableGenerativeFallback] Fulfillment enableGenerativeFallback + */ + + /** + * Constructs a new Fulfillment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Fulfillment. + * @implements IFulfillment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + */ + function Fulfillment(properties) { + this.messages = []; + this.setParameterActions = []; + this.conditionalCases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fulfillment messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.messages = $util.emptyArray; + + /** + * Fulfillment webhook. + * @member {string} webhook + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.webhook = ""; + + /** + * Fulfillment returnPartialResponses. + * @member {boolean} returnPartialResponses + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.returnPartialResponses = false; + + /** + * Fulfillment tag. + * @member {string} tag + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.tag = ""; + + /** + * Fulfillment setParameterActions. + * @member {Array.} setParameterActions + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.setParameterActions = $util.emptyArray; + + /** + * Fulfillment conditionalCases. + * @member {Array.} conditionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.conditionalCases = $util.emptyArray; + + /** + * Fulfillment advancedSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.advancedSettings = null; + + /** + * Fulfillment enableGenerativeFallback. + * @member {boolean} enableGenerativeFallback + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.enableGenerativeFallback = false; + + /** + * Creates a new Fulfillment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment instance + */ + Fulfillment.create = function create(properties) { + return new Fulfillment(properties); + }; + + /** + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fulfillment.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.v3beta1.ResponseMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webhook != null && Object.hasOwnProperty.call(message, "webhook")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.webhook); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.setParameterActions != null && message.setParameterActions.length) + for (var i = 0; i < message.setParameterActions.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.encode(message.setParameterActions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.conditionalCases != null && message.conditionalCases.length) + for (var i = 0; i < message.conditionalCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.conditionalCases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.returnPartialResponses != null && Object.hasOwnProperty.call(message, "returnPartialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); + if (message.enableGenerativeFallback != null && Object.hasOwnProperty.call(message, "enableGenerativeFallback")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.enableGenerativeFallback); + return writer; + }; + + /** + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fulfillment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fulfillment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.webhook = reader.string(); + break; + } + case 8: { + message.returnPartialResponses = reader.bool(); + break; + } + case 3: { + message.tag = reader.string(); + break; + } + case 4: { + if (!(message.setParameterActions && message.setParameterActions.length)) + message.setParameterActions = []; + message.setParameterActions.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.conditionalCases && message.conditionalCases.length)) + message.conditionalCases = []; + message.conditionalCases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32())); + break; + } + case 7: { + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); + break; + } + case 12: { + message.enableGenerativeFallback = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.ssml != null && message.hasOwnProperty("ssml")) { - object.ssml = message.ssml; - if (options.oneofs) - object.source = "ssml"; + } + return message; + }; + + /** + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fulfillment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fulfillment message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fulfillment.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.v3beta1.ResponseMessage.verify(message.messages[i]); + if (error) + return "messages." + error; } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; + } + if (message.webhook != null && message.hasOwnProperty("webhook")) + if (!$util.isString(message.webhook)) + return "webhook: string expected"; + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + if (typeof message.returnPartialResponses !== "boolean") + return "returnPartialResponses: boolean expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.setParameterActions != null && message.hasOwnProperty("setParameterActions")) { + if (!Array.isArray(message.setParameterActions)) + return "setParameterActions: array expected"; + for (var i = 0; i < message.setParameterActions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify(message.setParameterActions[i]); + if (error) + return "setParameterActions." + error; + } + } + if (message.conditionalCases != null && message.hasOwnProperty("conditionalCases")) { + if (!Array.isArray(message.conditionalCases)) + return "conditionalCases: array expected"; + for (var i = 0; i < message.conditionalCases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.conditionalCases[i]); + if (error) + return "conditionalCases." + error; + } + } + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); + if (error) + return "advancedSettings." + error; + } + if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) + if (typeof message.enableGenerativeFallback !== "boolean") + return "enableGenerativeFallback: boolean expected"; + return null; + }; + + /** + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment} Fulfillment + */ + Fulfillment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment) return object; - }; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.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.v3beta1.Fulfillment.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.messages[i]); + } + } + if (object.webhook != null) + message.webhook = String(object.webhook); + if (object.returnPartialResponses != null) + message.returnPartialResponses = Boolean(object.returnPartialResponses); + if (object.tag != null) + message.tag = String(object.tag); + if (object.setParameterActions) { + if (!Array.isArray(object.setParameterActions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: array expected"); + message.setParameterActions = []; + for (var i = 0; i < object.setParameterActions.length; ++i) { + if (typeof object.setParameterActions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.setParameterActions: object expected"); + message.setParameterActions[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.fromObject(object.setParameterActions[i]); + } + } + if (object.conditionalCases) { + if (!Array.isArray(object.conditionalCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: array expected"); + message.conditionalCases = []; + for (var i = 0; i < object.conditionalCases.length; ++i) { + if (typeof object.conditionalCases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditionalCases: object expected"); + message.conditionalCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.conditionalCases[i]); + } + } + if (object.advancedSettings != null) { + if (typeof object.advancedSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.advancedSettings: object expected"); + message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); + } + if (object.enableGenerativeFallback != null) + message.enableGenerativeFallback = Boolean(object.enableGenerativeFallback); + return message; + }; - /** - * Converts this OutputAudioText to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @instance - * @returns {Object.} JSON object - */ - OutputAudioText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment} message Fulfillment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fulfillment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.setParameterActions = []; + object.conditionalCases = []; + } + if (options.defaults) { + object.webhook = ""; + object.tag = ""; + object.advancedSettings = null; + object.returnPartialResponses = false; + object.enableGenerativeFallback = false; + } + 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.v3beta1.ResponseMessage.toObject(message.messages[j], options); + } + if (message.webhook != null && message.hasOwnProperty("webhook")) + object.webhook = message.webhook; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.setParameterActions && message.setParameterActions.length) { + object.setParameterActions = []; + for (var j = 0; j < message.setParameterActions.length; ++j) + object.setParameterActions[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.toObject(message.setParameterActions[j], options); + } + if (message.conditionalCases && message.conditionalCases.length) { + object.conditionalCases = []; + for (var j = 0; j < message.conditionalCases.length; ++j) + object.conditionalCases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.conditionalCases[j], options); + } + if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) + object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.returnPartialResponses != null && message.hasOwnProperty("returnPartialResponses")) + object.returnPartialResponses = message.returnPartialResponses; + if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) + object.enableGenerativeFallback = message.enableGenerativeFallback; + return object; + }; - /** - * Gets the default type url for OutputAudioText - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText"; - }; + /** + * Converts this Fulfillment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @instance + * @returns {Object.} JSON object + */ + Fulfillment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return OutputAudioText; - })(); + /** + * Gets the default type url for Fulfillment + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Fulfillment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment"; + }; - ResponseMessage.EndInteraction = (function() { + Fulfillment.SetParameterAction = (function() { /** - * Properties of an EndInteraction. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IEndInteraction + * Properties of a SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface ISetParameterAction + * @property {string|null} [parameter] SetParameterAction parameter + * @property {google.protobuf.IValue|null} [value] SetParameterAction value */ /** - * Constructs a new EndInteraction. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction + * Constructs a new SetParameterAction. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a SetParameterAction. + * @implements ISetParameterAction * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set */ - function EndInteraction(properties) { + function SetParameterAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101108,63 +104217,91 @@ } /** - * Creates a new EndInteraction instance using the specified properties. + * SetParameterAction parameter. + * @member {string} parameter + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance + */ + SetParameterAction.prototype.parameter = ""; + + /** + * SetParameterAction value. + * @member {google.protobuf.IValue|null|undefined} value + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + * @instance + */ + SetParameterAction.prototype.value = null; + + /** + * Creates a new SetParameterAction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction instance */ - EndInteraction.create = function create(properties) { - return new EndInteraction(properties); + SetParameterAction.create = function create(properties) { + return new SetParameterAction(properties); }; /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified SetParameterAction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encode = function encode(message, writer) { + SetParameterAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * Encodes the specified SetParameterAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ISetParameterAction} message SetParameterAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + SetParameterAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EndInteraction message from the specified reader or buffer. + * Decodes a SetParameterAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decode = function decode(reader, length) { + SetParameterAction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parameter = reader.string(); + break; + } + case 2: { + message.value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -101174,110 +104311,137 @@ }; /** - * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * Decodes a SetParameterAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EndInteraction.decodeDelimited = function decodeDelimited(reader) { + SetParameterAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EndInteraction message. + * Verifies a SetParameterAction message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EndInteraction.verify = function verify(message) { + SetParameterAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parameter != null && message.hasOwnProperty("parameter")) + if (!$util.isString(message.parameter)) + return "parameter: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.protobuf.Value.verify(message.value); + if (error) + return "value." + error; + } return null; }; /** - * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * Creates a SetParameterAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} SetParameterAction */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + SetParameterAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction) return object; - return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction(); + if (object.parameter != null) + message.parameter = String(object.parameter); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value: object expected"); + message.value = $root.google.protobuf.Value.fromObject(object.value); + } + return message; }; /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * Creates a plain object from a SetParameterAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction} message SetParameterAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EndInteraction.toObject = function toObject() { - return {}; + SetParameterAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parameter = ""; + object.value = null; + } + if (message.parameter != null && message.hasOwnProperty("parameter")) + object.parameter = message.parameter; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.protobuf.Value.toObject(message.value, options); + return object; }; /** - * Converts this EndInteraction to JSON. + * Converts this SetParameterAction to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @instance * @returns {Object.} JSON object */ - EndInteraction.prototype.toJSON = function toJSON() { + SetParameterAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EndInteraction + * Gets the default type url for SetParameterAction * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetParameterAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction"; }; - return EndInteraction; + return SetParameterAction; })(); - ResponseMessage.PlayAudio = (function() { + Fulfillment.ConditionalCases = (function() { /** - * Properties of a PlayAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IPlayAudio - * @property {string|null} [audioUri] PlayAudio audioUri - * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + * Properties of a ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @interface IConditionalCases + * @property {Array.|null} [cases] ConditionalCases cases */ /** - * Constructs a new PlayAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a PlayAudio. - * @implements IPlayAudio + * Constructs a new ConditionalCases. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment + * @classdesc Represents a ConditionalCases. + * @implements IConditionalCases * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set */ - function PlayAudio(properties) { + function ConditionalCases(properties) { + this.cases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101285,89 +104449,78 @@ } /** - * PlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio - * @instance - */ - PlayAudio.prototype.audioUri = ""; - - /** - * PlayAudio allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * ConditionalCases cases. + * @member {Array.} cases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @instance */ - PlayAudio.prototype.allowPlaybackInterruption = false; + ConditionalCases.prototype.cases = $util.emptyArray; /** - * Creates a new PlayAudio instance using the specified properties. + * Creates a new ConditionalCases instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases instance */ - PlayAudio.create = function create(properties) { - return new PlayAudio(properties); + ConditionalCases.create = function create(properties) { + return new ConditionalCases(properties); }; /** - * Encodes the specified PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified ConditionalCases message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encode = function encode(message, writer) { + ConditionalCases.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + if (message.cases != null && message.cases.length) + for (var i = 0; i < message.cases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.encode(message.cases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * Encodes the specified ConditionalCases message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases} message ConditionalCases message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + ConditionalCases.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlayAudio message from the specified reader or buffer. + * Decodes a ConditionalCases message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decode = function decode(reader, length) { + ConditionalCases.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioUri = reader.string(); - break; - } - case 2: { - message.allowPlaybackInterruption = reader.bool(); + if (!(message.cases && message.cases.length)) + message.cases = []; + message.cases.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.decode(reader, reader.uint32())); break; } default: @@ -101379,472 +104532,231 @@ }; /** - * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * Decodes a ConditionalCases message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlayAudio.decodeDelimited = function decodeDelimited(reader) { + ConditionalCases.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlayAudio message. + * Verifies a ConditionalCases message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlayAudio.verify = function verify(message) { + ConditionalCases.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; + if (message.cases != null && message.hasOwnProperty("cases")) { + if (!Array.isArray(message.cases)) + return "cases: array expected"; + for (var i = 0; i < message.cases.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify(message.cases[i]); + if (error) + return "cases." + error; + } + } return null; }; /** - * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a ConditionalCases message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} ConditionalCases */ - PlayAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + ConditionalCases.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases(); + if (object.cases) { + if (!Array.isArray(object.cases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: array expected"); + message.cases = []; + for (var i = 0; i < object.cases.length; ++i) { + if (typeof object.cases[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases: object expected"); + message.cases[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.fromObject(object.cases[i]); + } + } return message; }; /** - * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * Creates a plain object from a ConditionalCases message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} message PlayAudio + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases} message ConditionalCases * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlayAudio.toObject = function toObject(message, options) { + ConditionalCases.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.audioUri = ""; - object.allowPlaybackInterruption = false; + if (options.arrays || options.defaults) + object.cases = []; + if (message.cases && message.cases.length) { + object.cases = []; + for (var j = 0; j < message.cases.length; ++j) + object.cases[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.toObject(message.cases[j], options); } - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; return object; }; /** - * Converts this PlayAudio to JSON. + * Converts this ConditionalCases to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @instance * @returns {Object.} JSON object */ - PlayAudio.prototype.toJSON = function toJSON() { + ConditionalCases.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlayAudio + * Gets the default type url for ConditionalCases * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlayAudio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConditionalCases.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases"; }; - return PlayAudio; - })(); + ConditionalCases.Case = (function() { - ResponseMessage.MixedAudio = (function() { + /** + * Properties of a Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @interface ICase + * @property {string|null} [condition] Case condition + * @property {Array.|null} [caseContent] Case caseContent + */ - /** - * Properties of a MixedAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IMixedAudio - * @property {Array.|null} [segments] MixedAudio segments - */ + /** + * Constructs a new Case. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + * @classdesc Represents a Case. + * @implements ICase + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + */ + function Case(properties) { + this.caseContent = []; + if (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 MixedAudio. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a MixedAudio. - * @implements IMixedAudio - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set - */ - function MixedAudio(properties) { - this.segments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MixedAudio segments. - * @member {Array.} segments - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @instance - */ - MixedAudio.prototype.segments = $util.emptyArray; - - /** - * Creates a new MixedAudio instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio instance - */ - MixedAudio.create = function create(properties) { - return new MixedAudio(properties); - }; - - /** - * Encodes the specified MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MixedAudio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.segments != null && message.segments.length) - for (var i = 0; i < message.segments.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.encode(message.segments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MixedAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MixedAudio message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MixedAudio.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.segments && message.segments.length)) - message.segments = []; - message.segments.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MixedAudio message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MixedAudio.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MixedAudio message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MixedAudio.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.segments != null && message.hasOwnProperty("segments")) { - if (!Array.isArray(message.segments)) - return "segments: array expected"; - for (var i = 0; i < message.segments.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify(message.segments[i]); - if (error) - return "segments." + error; - } - } - return null; - }; - - /** - * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio - */ - MixedAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); - if (object.segments) { - if (!Array.isArray(object.segments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: array expected"); - message.segments = []; - for (var i = 0; i < object.segments.length; ++i) { - if (typeof object.segments[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: object expected"); - message.segments[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.fromObject(object.segments[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} message MixedAudio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MixedAudio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.segments = []; - if (message.segments && message.segments.length) { - object.segments = []; - for (var j = 0; j < message.segments.length; ++j) - object.segments[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.toObject(message.segments[j], options); - } - return object; - }; - - /** - * Converts this MixedAudio to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @instance - * @returns {Object.} JSON object - */ - MixedAudio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MixedAudio - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MixedAudio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio"; - }; - - MixedAudio.Segment = (function() { - - /** - * Properties of a Segment. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @interface ISegment - * @property {Uint8Array|null} [audio] Segment audio - * @property {string|null} [uri] Segment uri - * @property {boolean|null} [allowPlaybackInterruption] Segment allowPlaybackInterruption - */ - - /** - * Constructs a new Segment. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio - * @classdesc Represents a Segment. - * @implements ISegment - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set - */ - function Segment(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]]; - } - - /** - * Segment audio. - * @member {Uint8Array|null|undefined} audio - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - * @instance - */ - Segment.prototype.audio = null; - - /** - * Segment uri. - * @member {string|null|undefined} uri - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - * @instance - */ - Segment.prototype.uri = null; - - /** - * Segment allowPlaybackInterruption. - * @member {boolean} allowPlaybackInterruption - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment - * @instance - */ - Segment.prototype.allowPlaybackInterruption = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Case condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @instance + */ + Case.prototype.condition = ""; /** - * Segment content. - * @member {"audio"|"uri"|undefined} content - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * Case caseContent. + * @member {Array.} caseContent + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @instance */ - Object.defineProperty(Segment.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["audio", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + Case.prototype.caseContent = $util.emptyArray; /** - * Creates a new Segment instance using the specified properties. + * Creates a new Case instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment instance + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case instance */ - Segment.create = function create(properties) { - return new Segment(properties); + Case.create = function create(properties) { + return new Case(properties); }; /** - * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * Encodes the specified Case message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encode = function encode(message, writer) { + Case.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.audio); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.caseContent != null && message.caseContent.length) + for (var i = 0; i < message.caseContent.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.encode(message.caseContent[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * Encodes the specified Case message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.ICase} message Case message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Segment.encodeDelimited = function encodeDelimited(message, writer) { + Case.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Segment message from the specified reader or buffer. + * Decodes a Case message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decode = function decode(reader, length) { + Case.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audio = reader.bytes(); + message.condition = reader.string(); break; } case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.allowPlaybackInterruption = reader.bool(); + if (!(message.caseContent && message.caseContent.length)) + message.caseContent = []; + message.caseContent.push($root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.decode(reader, reader.uint32())); break; } default: @@ -101856,698 +104768,656 @@ }; /** - * Decodes a Segment message from the specified reader or buffer, length delimited. + * Decodes a Case message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Segment.decodeDelimited = function decodeDelimited(reader) { + Case.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Segment message. + * Verifies a Case message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Segment.verify = function verify(message) { + Case.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.audio != null && message.hasOwnProperty("audio")) { - properties.content = 1; - if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) - return "audio: buffer expected"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.caseContent != null && message.hasOwnProperty("caseContent")) { + if (!Array.isArray(message.caseContent)) + return "caseContent: array expected"; + for (var i = 0; i < message.caseContent.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify(message.caseContent[i]); + if (error) + return "caseContent." + error; + } } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - if (typeof message.allowPlaybackInterruption !== "boolean") - return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * Creates a Case message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} Case */ - Segment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + Case.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); - 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; - if (object.uri != null) - message.uri = String(object.uri); - if (object.allowPlaybackInterruption != null) - message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.caseContent) { + if (!Array.isArray(object.caseContent)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: array expected"); + message.caseContent = []; + for (var i = 0; i < object.caseContent.length; ++i) { + if (typeof object.caseContent[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.caseContent: object expected"); + message.caseContent[i] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.fromObject(object.caseContent[i]); + } + } return message; }; /** - * Creates a plain object from a Segment message. Also converts values to other types if specified. + * Creates a plain object from a Case message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} message Segment + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case} message Case * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Segment.toObject = function toObject(message, options) { + Case.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.caseContent = []; if (options.defaults) - object.allowPlaybackInterruption = false; - 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 (options.oneofs) - object.content = "audio"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.content = "uri"; + object.condition = ""; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.caseContent && message.caseContent.length) { + object.caseContent = []; + for (var j = 0; j < message.caseContent.length; ++j) + object.caseContent[j] = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.toObject(message.caseContent[j], options); } - if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) - object.allowPlaybackInterruption = message.allowPlaybackInterruption; return object; }; /** - * Converts this Segment to JSON. + * Converts this Case to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @instance * @returns {Object.} JSON object */ - Segment.prototype.toJSON = function toJSON() { + Case.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Segment + * Gets the default type url for Case * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Case.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case"; }; - return Segment; - })(); + Case.CaseContent = (function() { - return MixedAudio; - })(); + /** + * Properties of a CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @interface ICaseContent + * @property {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null} [message] CaseContent message + * @property {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null} [additionalCases] CaseContent additionalCases + */ - ResponseMessage.TelephonyTransferCall = (function() { + /** + * Constructs a new CaseContent. + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + * @classdesc Represents a CaseContent. + * @implements ICaseContent + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + */ + function CaseContent(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 TelephonyTransferCall. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface ITelephonyTransferCall - * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber - */ + /** + * CaseContent message. + * @member {google.cloud.dialogflow.cx.v3beta1.IResponseMessage|null|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.message = null; - /** - * Constructs a new TelephonyTransferCall. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a TelephonyTransferCall. - * @implements ITelephonyTransferCall - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set - */ - function TelephonyTransferCall(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]]; - } + /** + * CaseContent additionalCases. + * @member {google.cloud.dialogflow.cx.v3beta1.Fulfillment.IConditionalCases|null|undefined} additionalCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + CaseContent.prototype.additionalCases = null; - /** - * TelephonyTransferCall phoneNumber. - * @member {string|null|undefined} phoneNumber - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @instance - */ - TelephonyTransferCall.prototype.phoneNumber = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CaseContent casesOrMessage. + * @member {"message"|"additionalCases"|undefined} casesOrMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + */ + Object.defineProperty(CaseContent.prototype, "casesOrMessage", { + get: $util.oneOfGetter($oneOfFields = ["message", "additionalCases"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * TelephonyTransferCall endpoint. - * @member {"phoneNumber"|undefined} endpoint - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @instance - */ - Object.defineProperty(TelephonyTransferCall.prototype, "endpoint", { - get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new CaseContent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent instance + */ + CaseContent.create = function create(properties) { + return new CaseContent(properties); + }; - /** - * Creates a new TelephonyTransferCall instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall instance - */ - TelephonyTransferCall.create = function create(properties) { - return new TelephonyTransferCall(properties); - }; + /** + * Encodes the specified CaseContent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.additionalCases != null && Object.hasOwnProperty.call(message, "additionalCases")) + $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.encode(message.additionalCases, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); - return writer; - }; + /** + * Encodes the specified CaseContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.ICaseContent} message CaseContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaseContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a CaseContent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phoneNumber = reader.string(); - break; + /** + * Decodes a CaseContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaseContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaseContent message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaseContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) { + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify(message.message); + if (error) + return "message." + error; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + if (properties.casesOrMessage === 1) + return "casesOrMessage: multiple values"; + properties.casesOrMessage = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.verify(message.additionalCases); + if (error) + return "additionalCases." + error; + } + } + return null; + }; - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a CaseContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} CaseContent + */ + CaseContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message: object expected"); + message.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.fromObject(object.message); + } + if (object.additionalCases != null) { + if (typeof object.additionalCases !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additionalCases: object expected"); + message.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.fromObject(object.additionalCases); + } + return message; + }; - /** - * Verifies a TelephonyTransferCall message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TelephonyTransferCall.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - properties.endpoint = 1; - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - } - return null; - }; + /** + * Creates a plain object from a CaseContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent} message CaseContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaseContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.message != null && message.hasOwnProperty("message")) { + object.message = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.message, options); + if (options.oneofs) + object.casesOrMessage = "message"; + } + if (message.additionalCases != null && message.hasOwnProperty("additionalCases")) { + object.additionalCases = $root.google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.toObject(message.additionalCases, options); + if (options.oneofs) + object.casesOrMessage = "additionalCases"; + } + return object; + }; - /** - * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - */ - TelephonyTransferCall.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; + /** + * Converts this CaseContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @instance + * @returns {Object.} JSON object + */ + CaseContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonyTransferCall.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - object.phoneNumber = message.phoneNumber; - if (options.oneofs) - object.endpoint = "phoneNumber"; - } - return object; - }; + /** + * Gets the default type url for CaseContent + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaseContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent"; + }; - /** - * Converts this TelephonyTransferCall to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @instance - * @returns {Object.} JSON object - */ - TelephonyTransferCall.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return CaseContent; + })(); - /** - * Gets the default type url for TelephonyTransferCall - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TelephonyTransferCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall"; - }; + return Case; + })(); - return TelephonyTransferCall; + return ConditionalCases; })(); - ResponseMessage.KnowledgeInfoCard = (function() { + return Fulfillment; + })(); - /** - * Properties of a KnowledgeInfoCard. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @interface IKnowledgeInfoCard - */ + v3beta1.ResponseMessage = (function() { - /** - * Constructs a new KnowledgeInfoCard. - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage - * @classdesc Represents a KnowledgeInfoCard. - * @implements IKnowledgeInfoCard - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard=} [properties] Properties to set - */ - function KnowledgeInfoCard(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 ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IResponseMessage + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null} [text] ResponseMessage text + * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null} [conversationSuccess] ResponseMessage conversationSuccess + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null} [outputAudioText] ResponseMessage outputAudioText + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null} [playAudio] ResponseMessage playAudio + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null} [mixedAudio] ResponseMessage mixedAudio + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall + * @property {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null} [knowledgeInfoCard] ResponseMessage knowledgeInfoCard + * @property {string|null} [channel] ResponseMessage channel + */ - /** - * Creates a new KnowledgeInfoCard instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard instance - */ - KnowledgeInfoCard.create = function create(properties) { - return new KnowledgeInfoCard(properties); - }; + /** + * Constructs a new ResponseMessage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ResponseMessage. + * @implements IResponseMessage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + */ + function ResponseMessage(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 KnowledgeInfoCard message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard} message KnowledgeInfoCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeInfoCard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * ResponseMessage text. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.text = null; - /** - * Encodes the specified KnowledgeInfoCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard} message KnowledgeInfoCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeInfoCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ResponseMessage payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.payload = null; - /** - * Decodes a KnowledgeInfoCard message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeInfoCard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ResponseMessage conversationSuccess. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess|null|undefined} conversationSuccess + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.conversationSuccess = null; - /** - * Decodes a KnowledgeInfoCard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeInfoCard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KnowledgeInfoCard message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeInfoCard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a KnowledgeInfoCard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard - */ - KnowledgeInfoCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) - return object; - return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(); - }; - - /** - * Creates a plain object from a KnowledgeInfoCard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} message KnowledgeInfoCard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeInfoCard.toObject = function toObject() { - return {}; - }; - - /** - * Converts this KnowledgeInfoCard to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @instance - * @returns {Object.} JSON object - */ - KnowledgeInfoCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KnowledgeInfoCard - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KnowledgeInfoCard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard"; - }; - - return KnowledgeInfoCard; - })(); - - return ResponseMessage; - })(); + /** + * ResponseMessage outputAudioText. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText|null|undefined} outputAudioText + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.outputAudioText = null; - v3beta1.ValidationMessage = (function() { + /** + * ResponseMessage liveAgentHandoff. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance + */ + ResponseMessage.prototype.liveAgentHandoff = null; /** - * Properties of a ValidationMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IValidationMessage - * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType - * @property {Array.|null} [resources] ValidationMessage resources - * @property {Array.|null} [resourceNames] ValidationMessage resourceNames - * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null} [severity] ValidationMessage severity - * @property {string|null} [detail] ValidationMessage detail + * ResponseMessage endInteraction. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance */ + ResponseMessage.prototype.endInteraction = null; /** - * Constructs a new ValidationMessage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set + * ResponseMessage playAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio|null|undefined} playAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @instance */ - 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]]; - } + ResponseMessage.prototype.playAudio = null; /** - * ValidationMessage resourceType. - * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType} resourceType - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * ResponseMessage mixedAudio. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio|null|undefined} mixedAudio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance */ - ValidationMessage.prototype.resourceType = 0; + ResponseMessage.prototype.mixedAudio = null; /** - * ValidationMessage resources. - * @member {Array.} resources - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * ResponseMessage telephonyTransferCall. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance */ - ValidationMessage.prototype.resources = $util.emptyArray; + ResponseMessage.prototype.telephonyTransferCall = null; /** - * ValidationMessage resourceNames. - * @member {Array.} resourceNames - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * ResponseMessage knowledgeInfoCard. + * @member {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard|null|undefined} knowledgeInfoCard + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance */ - ValidationMessage.prototype.resourceNames = $util.emptyArray; + ResponseMessage.prototype.knowledgeInfoCard = null; /** - * ValidationMessage severity. - * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity} severity - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * ResponseMessage channel. + * @member {string} channel + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance */ - ValidationMessage.prototype.severity = 0; + ResponseMessage.prototype.channel = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ValidationMessage detail. - * @member {string} detail - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * ResponseMessage message. + * @member {"text"|"payload"|"conversationSuccess"|"outputAudioText"|"liveAgentHandoff"|"endInteraction"|"playAudio"|"mixedAudio"|"telephonyTransferCall"|"knowledgeInfoCard"|undefined} message + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance */ - ValidationMessage.prototype.detail = ""; + Object.defineProperty(ResponseMessage.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "conversationSuccess", "outputAudioText", "liveAgentHandoff", "endInteraction", "playAudio", "mixedAudio", "telephonyTransferCall", "knowledgeInfoCard"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ValidationMessage instance using the specified properties. + * Creates a new ResponseMessage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage instance + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage instance */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); + ResponseMessage.create = function create(properties) { + return new ResponseMessage(properties); }; /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encode = function encode(message, writer) { + ResponseMessage.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.v3beta1.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.outputAudioText != null && Object.hasOwnProperty.call(message, "outputAudioText")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.encode(message.outputAudioText, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.conversationSuccess != null && Object.hasOwnProperty.call(message, "conversationSuccess")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.encode(message.conversationSuccess, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.playAudio != null && Object.hasOwnProperty.call(message, "playAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.encode(message.playAudio, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.mixedAudio != null && Object.hasOwnProperty.call(message, "mixedAudio")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.encode(message.mixedAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.channel); + if (message.knowledgeInfoCard != null && Object.hasOwnProperty.call(message, "knowledgeInfoCard")) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.encode(message.knowledgeInfoCard, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IResponseMessage} message ResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { + ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationMessage message from the specified reader or buffer. + * Decodes a ResponseMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage * @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) { + ResponseMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.resourceType = reader.int32(); + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push(reader.string()); + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } - case 6: { - if (!(message.resourceNames && message.resourceNames.length)) - message.resourceNames = []; - message.resourceNames.push($root.google.cloud.dialogflow.cx.v3beta1.ResourceName.decode(reader, reader.uint32())); + case 9: { + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.decode(reader, reader.uint32()); break; } - case 3: { - message.severity = reader.int32(); + case 8: { + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.decode(reader, reader.uint32()); break; } - case 4: { - message.detail = reader.string(); + case 10: { + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); + break; + } + case 11: { + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); + break; + } + case 12: { + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.decode(reader, reader.uint32()); + break; + } + case 13: { + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.decode(reader, reader.uint32()); + break; + } + case 18: { + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + break; + } + case 20: { + message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.decode(reader, reader.uint32()); + break; + } + case 19: { + message.channel = reader.string(); break; } default: @@ -102559,894 +105429,561 @@ }; /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage * @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) { + ResponseMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationMessage message. + * Verifies a ResponseMessage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @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) { + ResponseMessage.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; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify(message.text); + if (error) + return "text." + error; } - 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.v3beta1.ResourceName.verify(message.resourceNames[i]); + if (message.payload != null && message.hasOwnProperty("payload")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.protobuf.Struct.verify(message.payload); if (error) - return "resourceNames." + error; + return "payload." + 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.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify(message.conversationSuccess); + if (error) + return "conversationSuccess." + error; } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; + } + if (message.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify(message.outputAudioText); + if (error) + return "outputAudioText." + error; + } + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + if (error) + return "liveAgentHandoff." + error; + } + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); + if (error) + return "endInteraction." + error; + } + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify(message.playAudio); + if (error) + return "playAudio." + error; + } + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify(message.mixedAudio); + if (error) + return "mixedAudio." + error; + } + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (error) + return "telephonyTransferCall." + error; + } + } + if (message.knowledgeInfoCard != null && message.hasOwnProperty("knowledgeInfoCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify(message.knowledgeInfoCard); + if (error) + return "knowledgeInfoCard." + error; + } + } + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; return null; }; /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} ResponseMessage */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) + ResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResponseMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text: object expected"); + message.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.text); } - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ValidationMessage.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) - message.resources[i] = String(object.resources[i]); + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); } - if (object.resourceNames) { - if (!Array.isArray(object.resourceNames)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ValidationMessage.resourceNames: object expected"); - message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResourceName.fromObject(object.resourceNames[i]); - } + if (object.conversationSuccess != null) { + if (typeof object.conversationSuccess !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversationSuccess: object expected"); + message.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.fromObject(object.conversationSuccess); } - 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.outputAudioText != null) { + if (typeof object.outputAudioText !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.outputAudioText: object expected"); + message.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.fromObject(object.outputAudioText); } - if (object.detail != null) - message.detail = String(object.detail); + if (object.liveAgentHandoff != null) { + if (typeof object.liveAgentHandoff !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.liveAgentHandoff: object expected"); + message.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); + } + if (object.endInteraction != null) { + if (typeof object.endInteraction !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.endInteraction: object expected"); + message.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); + } + if (object.playAudio != null) { + if (typeof object.playAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.playAudio: object expected"); + message.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.fromObject(object.playAudio); + } + if (object.mixedAudio != null) { + if (typeof object.mixedAudio !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixedAudio: object expected"); + message.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.fromObject(object.mixedAudio); + } + if (object.telephonyTransferCall != null) { + if (typeof object.telephonyTransferCall !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.telephonyTransferCall: object expected"); + message.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + } + if (object.knowledgeInfoCard != null) { + if (typeof object.knowledgeInfoCard !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.knowledgeInfoCard: object expected"); + message.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.fromObject(object.knowledgeInfoCard); + } + if (object.channel != null) + message.channel = String(object.channel); return message; }; /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} message ValidationMessage + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage} message ResponseMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationMessage.toObject = function toObject(message, options) { + ResponseMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.resourceNames = []; + if (options.defaults) + object.channel = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; } - if (options.defaults) { - object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.detail = ""; + if (message.payload != null && message.hasOwnProperty("payload")) { + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); + if (options.oneofs) + object.message = "payload"; } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3beta1.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.outputAudioText != null && message.hasOwnProperty("outputAudioText")) { + object.outputAudioText = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.toObject(message.outputAudioText, options); + if (options.oneofs) + object.message = "outputAudioText"; } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResourceName.toObject(message.resourceNames[j], options); + if (message.conversationSuccess != null && message.hasOwnProperty("conversationSuccess")) { + object.conversationSuccess = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.toObject(message.conversationSuccess, options); + if (options.oneofs) + object.message = "conversationSuccess"; + } + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + object.liveAgentHandoff = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); + if (options.oneofs) + object.message = "liveAgentHandoff"; + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + object.endInteraction = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); + if (options.oneofs) + object.message = "endInteraction"; + } + if (message.playAudio != null && message.hasOwnProperty("playAudio")) { + object.playAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.toObject(message.playAudio, options); + if (options.oneofs) + object.message = "playAudio"; + } + if (message.mixedAudio != null && message.hasOwnProperty("mixedAudio")) { + object.mixedAudio = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.toObject(message.mixedAudio, options); + if (options.oneofs) + object.message = "mixedAudio"; + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + object.telephonyTransferCall = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); + if (options.oneofs) + object.message = "telephonyTransferCall"; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + if (message.knowledgeInfoCard != null && message.hasOwnProperty("knowledgeInfoCard")) { + object.knowledgeInfoCard = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.toObject(message.knowledgeInfoCard, options); + if (options.oneofs) + object.message = "knowledgeInfoCard"; } return object; }; /** - * Converts this ValidationMessage to JSON. + * Converts this ResponseMessage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @instance * @returns {Object.} JSON object */ - ValidationMessage.prototype.toJSON = function toJSON() { + ResponseMessage.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 ResponseMessage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidationMessage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage"; }; - /** - * ResourceType enum. - * @name google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; - })(); - - v3beta1.ResourceName = (function() { + ResponseMessage.Text = (function() { - /** - * Properties of a ResourceName. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IResourceName - * @property {string|null} [name] ResourceName name - * @property {string|null} [displayName] ResourceName displayName - */ + /** + * Properties of a Text. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IText + * @property {Array.|null} [text] Text text + * @property {boolean|null} [allowPlaybackInterruption] Text allowPlaybackInterruption + */ - /** - * Constructs a new ResourceName. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ResourceName. - * @implements IResourceName - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set - */ - 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]]; - } + /** + * Constructs a new Text. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + */ + function Text(properties) { + this.text = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ResourceName name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - */ - ResourceName.prototype.name = ""; + /** + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; - /** - * ResourceName displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - */ - ResourceName.prototype.displayName = ""; + /** + * Text allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.allowPlaybackInterruption = false; - /** - * Creates a new ResourceName instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName instance - */ - ResourceName.create = function create(properties) { - return new ResourceName(properties); - }; + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; - /** - * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; - /** - * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IText} message Text message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Text.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ResourceName message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResourceName} ResourceName - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ResourceName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Text.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ResourceName message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @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) { - 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"; - return null; - }; - - /** - * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName - */ - ResourceName.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResourceName) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 ResourceName message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ResourceName} message ResourceName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - return object; - }; - - /** - * Converts this ResourceName to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @instance - * @returns {Object.} JSON object - */ - ResourceName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceName - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResourceName"; - }; - - return ResourceName; - })(); - - v3beta1.GenerativeSettings = (function() { - - /** - * Properties of a GenerativeSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGenerativeSettings - * @property {string|null} [name] GenerativeSettings name - * @property {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings|null} [fallbackSettings] GenerativeSettings fallbackSettings - * @property {google.cloud.dialogflow.cx.v3beta1.ISafetySettings|null} [generativeSafetySettings] GenerativeSettings generativeSafetySettings - * @property {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] GenerativeSettings knowledgeConnectorSettings - * @property {string|null} [languageCode] GenerativeSettings languageCode - */ - - /** - * Constructs a new GenerativeSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GenerativeSettings. - * @implements IGenerativeSettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } - - /** - * GenerativeSettings name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.name = ""; - - /** - * GenerativeSettings fallbackSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings|null|undefined} fallbackSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.fallbackSettings = null; - - /** - * GenerativeSettings generativeSafetySettings. - * @member {google.cloud.dialogflow.cx.v3beta1.ISafetySettings|null|undefined} generativeSafetySettings - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.generativeSafetySettings = null; - - /** - * GenerativeSettings knowledgeConnectorSettings. - * @member {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.knowledgeConnectorSettings = null; - - /** - * GenerativeSettings languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - */ - GenerativeSettings.prototype.languageCode = ""; - - /** - * Creates a new GenerativeSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings instance - */ - GenerativeSettings.create = function create(properties) { - return new GenerativeSettings(properties); - }; - - /** - * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings} message GenerativeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerativeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fallbackSettings != null && Object.hasOwnProperty.call(message, "fallbackSettings")) - $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings} message GenerativeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerativeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerativeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GenerativeSettings} GenerativeSettings - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.name = reader.string(); - break; - } - case 1: { - message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.decode(reader, reader.uint32()); - break; - } - case 3: { - message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.decode(reader, reader.uint32()); - break; - } - case 7: { - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.decode(reader, reader.uint32()); - break; - } - case 4: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a Text message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Text.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; } - } - return message; - }; - - /** - * Decodes a GenerativeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; - /** - * Verifies a GenerativeSettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @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) { - 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.v3beta1.GenerativeSettings.FallbackSettings.verify(message.fallbackSettings); - if (error) - return "fallbackSettings." + error; - } - if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.verify(message.generativeSafetySettings); - if (error) - return "generativeSafetySettings." + error; - } - if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.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"; - return null; - }; + /** + * Creates a Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; - /** - * Creates a GenerativeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings - */ - GenerativeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text} message Text + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Text.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.text = []; + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GenerativeSettings.fallbackSettings: object expected"); - message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.fromObject(object.fallbackSettings); - } - if (object.generativeSafetySettings != null) { - if (typeof object.generativeSafetySettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.generativeSafetySettings: object expected"); - message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.fromObject(object.generativeSafetySettings); - } - if (object.knowledgeConnectorSettings != null) { - if (typeof object.knowledgeConnectorSettings !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.knowledgeConnectorSettings: object expected"); - message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + }; - /** - * Creates a plain object from a GenerativeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} message GenerativeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerativeSettings.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; - } - if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) - object.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.toObject(message.fallbackSettings, options); - if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) - object.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); - return object; - }; + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GenerativeSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @instance - * @returns {Object.} JSON object - */ - GenerativeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Text + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Text.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text"; + }; - /** - * Gets the default type url for GenerativeSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerativeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GenerativeSettings"; - }; + return Text; + })(); - GenerativeSettings.FallbackSettings = (function() { + ResponseMessage.LiveAgentHandoff = (function() { /** - * Properties of a FallbackSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @interface IFallbackSettings - * @property {string|null} [selectedPrompt] FallbackSettings selectedPrompt - * @property {Array.|null} [promptTemplates] FallbackSettings promptTemplates + * Properties of a LiveAgentHandoff. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface ILiveAgentHandoff + * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata */ /** - * Constructs a new FallbackSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @classdesc Represents a FallbackSettings. - * @implements IFallbackSettings + * Constructs a new LiveAgentHandoff. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a LiveAgentHandoff. + * @implements ILiveAgentHandoff * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set */ - function FallbackSettings(properties) { - this.promptTemplates = []; + function LiveAgentHandoff(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103454,92 +105991,75 @@ } /** - * FallbackSettings selectedPrompt. - * @member {string} selectedPrompt - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings - * @instance - */ - FallbackSettings.prototype.selectedPrompt = ""; - - /** - * FallbackSettings promptTemplates. - * @member {Array.} promptTemplates - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * LiveAgentHandoff metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @instance */ - FallbackSettings.prototype.promptTemplates = $util.emptyArray; + LiveAgentHandoff.prototype.metadata = null; /** - * Creates a new FallbackSettings instance using the specified properties. + * Creates a new LiveAgentHandoff instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance */ - FallbackSettings.create = function create(properties) { - return new FallbackSettings(properties); + LiveAgentHandoff.create = function create(properties) { + return new LiveAgentHandoff(properties); }; /** - * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FallbackSettings.encode = function encode(message, writer) { + LiveAgentHandoff.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.encode(message.promptTemplates[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.verify|verify} messages. + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ILiveAgentHandoff} message LiveAgentHandoff message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FallbackSettings.encodeDelimited = function encodeDelimited(message, writer) { + LiveAgentHandoff.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FallbackSettings message from the specified reader or buffer. + * Decodes a LiveAgentHandoff message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @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) { + LiveAgentHandoff.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); while (reader.pos < end) { var tag = reader.uint32(); 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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.decode(reader, reader.uint32())); + case 1: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -103551,402 +106071,127 @@ }; /** - * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff * @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) { + LiveAgentHandoff.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FallbackSettings message. + * Verifies a LiveAgentHandoff message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @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) { + LiveAgentHandoff.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify(message.promptTemplates[i]); - if (error) - return "promptTemplates." + error; - } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; } return null; }; /** - * Creates a FallbackSettings message from a plain object. Also converts values to their respective internal types. + * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff */ - FallbackSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) + LiveAgentHandoff.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.GenerativeSettings.FallbackSettings.promptTemplates: object expected"); - message.promptTemplates[i] = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.fromObject(object.promptTemplates[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); } return message; }; /** - * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} message FallbackSettings + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff} message LiveAgentHandoff * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FallbackSettings.toObject = function toObject(message, options) { + LiveAgentHandoff.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.toObject(message.promptTemplates[j], options); - } + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); return object; }; /** - * Converts this FallbackSettings to JSON. + * Converts this LiveAgentHandoff to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @instance * @returns {Object.} JSON object */ - FallbackSettings.prototype.toJSON = function toJSON() { + LiveAgentHandoff.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 LiveAgentHandoff * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FallbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LiveAgentHandoff.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff"; }; - FallbackSettings.PromptTemplate = (function() { - - /** - * Properties of a PromptTemplate. - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings - * @interface IPromptTemplate - * @property {string|null} [displayName] PromptTemplate displayName - * @property {string|null} [promptText] PromptTemplate promptText - * @property {boolean|null} [frozen] PromptTemplate frozen - */ - - /** - * Constructs a new PromptTemplate. - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings - * @classdesc Represents a PromptTemplate. - * @implements IPromptTemplate - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } - - /** - * PromptTemplate displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.displayName = ""; - - /** - * PromptTemplate promptText. - * @member {string} promptText - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.promptText = ""; - - /** - * PromptTemplate frozen. - * @member {boolean} frozen - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - */ - PromptTemplate.prototype.frozen = false; - - /** - * Creates a new PromptTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate instance - */ - PromptTemplate.create = function create(properties) { - return new PromptTemplate(properties); - }; - - /** - * Encodes the specified PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; - - /** - * Encodes the specified PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; - - /** - * Decodes a PromptTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - }; - - /** - * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; - - /** - * Verifies a PromptTemplate message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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 PromptTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate - */ - PromptTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 a plain object from a PromptTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; - - /** - * Converts this PromptTemplate to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate - * @instance - * @returns {Object.} JSON object - */ - PromptTemplate.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.v3beta1.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate"; - }; - - return PromptTemplate; - })(); - - return FallbackSettings; + return LiveAgentHandoff; })(); - GenerativeSettings.KnowledgeConnectorSettings = (function() { + ResponseMessage.ConversationSuccess = (function() { /** - * Properties of a KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.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 + * Properties of a ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IConversationSuccess + * @property {google.protobuf.IStruct|null} [metadata] ConversationSuccess metadata */ /** - * Constructs a new KnowledgeConnectorSettings. - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings - * @classdesc Represents a KnowledgeConnectorSettings. - * @implements IKnowledgeConnectorSettings + * Constructs a new ConversationSuccess. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a ConversationSuccess. + * @implements IConversationSuccess * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set */ - function KnowledgeConnectorSettings(properties) { + function ConversationSuccess(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103954,131 +106199,75 @@ } /** - * KnowledgeConnectorSettings business. - * @member {string} business - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.business = ""; - - /** - * KnowledgeConnectorSettings agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.agent = ""; - - /** - * KnowledgeConnectorSettings agentIdentity. - * @member {string} agentIdentity - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.agentIdentity = ""; - - /** - * KnowledgeConnectorSettings businessDescription. - * @member {string} businessDescription - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings - * @instance - */ - KnowledgeConnectorSettings.prototype.businessDescription = ""; - - /** - * KnowledgeConnectorSettings agentScope. - * @member {string} agentScope - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * ConversationSuccess metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @instance */ - KnowledgeConnectorSettings.prototype.agentScope = ""; + ConversationSuccess.prototype.metadata = null; /** - * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * Creates a new ConversationSuccess instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess instance */ - KnowledgeConnectorSettings.create = function create(properties) { - return new KnowledgeConnectorSettings(properties); + ConversationSuccess.create = function create(properties) { + return new ConversationSuccess(properties); }; /** - * Encodes the specified KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * Encodes the specified ConversationSuccess message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeConnectorSettings.encode = function encode(message, writer) { + ConversationSuccess.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * Encodes the specified ConversationSuccess message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings} message KnowledgeConnectorSettings message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IConversationSuccess} message ConversationSuccess message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeConnectorSettings.encodeDelimited = function encodeDelimited(message, writer) { + ConversationSuccess.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * Decodes a ConversationSuccess message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess * @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) { + ConversationSuccess.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); while (reader.pos < end) { var tag = reader.uint32(); 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(); + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -104090,380 +106279,129 @@ }; /** - * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * Decodes a ConversationSuccess message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess * @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) { + ConversationSuccess.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KnowledgeConnectorSettings message. + * Verifies a ConversationSuccess message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @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) { + ConversationSuccess.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.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; /** - * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationSuccess message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} ConversationSuccess */ - KnowledgeConnectorSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + ConversationSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } return message; }; /** - * Creates a plain object from a KnowledgeConnectorSettings message. Also converts values to other types if specified. + * Creates a plain object from a ConversationSuccess message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} message KnowledgeConnectorSettings + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess} message ConversationSuccess * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KnowledgeConnectorSettings.toObject = function toObject(message, options) { + ConversationSuccess.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.business = ""; - object.agent = ""; - object.agentIdentity = ""; - object.businessDescription = ""; - object.agentScope = ""; - } - 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 (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); return object; }; /** - * Converts this KnowledgeConnectorSettings to JSON. + * Converts this ConversationSuccess to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @instance * @returns {Object.} JSON object */ - KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { + ConversationSuccess.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KnowledgeConnectorSettings + * Gets the default type url for ConversationSuccess * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KnowledgeConnectorSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess"; }; - return KnowledgeConnectorSettings; + return ConversationSuccess; })(); - return GenerativeSettings; - })(); - - v3beta1.SafetySettings = (function() { - - /** - * Properties of a SafetySettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ISafetySettings - * @property {Array.|null} [bannedPhrases] SafetySettings bannedPhrases - */ - - /** - * Constructs a new SafetySettings. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a SafetySettings. - * @implements ISafetySettings - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings - * @instance - */ - SafetySettings.prototype.bannedPhrases = $util.emptyArray; - - /** - * Creates a new SafetySettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ISafetySettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.Phrase.encode(message.bannedPhrases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bannedPhrases && message.bannedPhrases.length)) - message.bannedPhrases = []; - message.bannedPhrases.push($root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SafetySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SafetySettings message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @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) { - 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.v3beta1.SafetySettings.Phrase.verify(message.bannedPhrases[i]); - if (error) - return "bannedPhrases." + error; - } - } - return null; - }; - - /** - * Creates a SafetySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings - */ - SafetySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings(); - if (object.bannedPhrases) { - if (!Array.isArray(object.bannedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.bannedPhrases: object expected"); - message.bannedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.fromObject(object.bannedPhrases[i]); - } - } - 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.v3beta1.SafetySettings - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.Phrase.toObject(message.bannedPhrases[j], options); - } - return object; - }; - - /** - * Converts this SafetySettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @instance - * @returns {Object.} JSON object - */ - SafetySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SafetySettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SafetySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SafetySettings"; - }; - - SafetySettings.Phrase = (function() { + ResponseMessage.OutputAudioText = (function() { /** - * Properties of a Phrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @interface IPhrase - * @property {string|null} [text] Phrase text - * @property {string|null} [languageCode] Phrase languageCode + * Properties of an OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IOutputAudioText + * @property {string|null} [text] OutputAudioText text + * @property {string|null} [ssml] OutputAudioText ssml + * @property {boolean|null} [allowPlaybackInterruption] OutputAudioText allowPlaybackInterruption */ /** - * Constructs a new Phrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings - * @classdesc Represents a Phrase. - * @implements IPhrase + * Constructs a new OutputAudioText. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an OutputAudioText. + * @implements IOutputAudioText * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.IPhrase=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set */ - function Phrase(properties) { + function OutputAudioText(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104471,80 +106409,104 @@ } /** - * Phrase text. - * @member {string} text - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * OutputAudioText text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @instance */ - Phrase.prototype.text = ""; + OutputAudioText.prototype.text = null; /** - * Phrase languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * OutputAudioText ssml. + * @member {string|null|undefined} ssml + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @instance */ - Phrase.prototype.languageCode = ""; + OutputAudioText.prototype.ssml = null; /** - * Creates a new Phrase instance using the specified properties. + * OutputAudioText allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + OutputAudioText.prototype.allowPlaybackInterruption = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputAudioText source. + * @member {"text"|"ssml"|undefined} source + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + * @instance + */ + Object.defineProperty(OutputAudioText.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputAudioText instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.IPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase instance + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText instance */ - Phrase.create = function create(properties) { - return new Phrase(properties); + OutputAudioText.create = function create(properties) { + return new OutputAudioText(properties); }; /** - * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.verify|verify} messages. + * Encodes the specified OutputAudioText message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.IPhrase} message Phrase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer) { + OutputAudioText.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.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); return writer; }; /** - * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.verify|verify} messages. + * Encodes the specified OutputAudioText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.IPhrase} message Phrase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IOutputAudioText} message OutputAudioText message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioText.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Phrase message from the specified reader or buffer. + * Decodes an OutputAudioText message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText * @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) { + OutputAudioText.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -104553,7 +106515,11 @@ break; } case 2: { - message.languageCode = reader.string(); + message.ssml = reader.string(); + break; + } + case 3: { + message.allowPlaybackInterruption = reader.bool(); break; } default: @@ -104565,965 +106531,1457 @@ }; /** - * Decodes a Phrase message from the specified reader or buffer, length delimited. + * Decodes an OutputAudioText message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText * @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) { + OutputAudioText.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Phrase message. + * Verifies an OutputAudioText message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @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) { + OutputAudioText.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.source = 1; 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"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.ssml)) + return "ssml: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; return null; }; /** - * Creates a Phrase message from a plain object. Also converts values to their respective internal types. + * Creates an OutputAudioText message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} OutputAudioText */ - Phrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + OutputAudioText.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText(); if (object.text != null) message.text = String(object.text); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.ssml != null) + message.ssml = String(object.ssml); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); return message; }; /** - * Creates a plain object from a Phrase message. Also converts values to other types if specified. + * Creates a plain object from an OutputAudioText message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static - * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} message Phrase + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText} message OutputAudioText * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options) { + OutputAudioText.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.text = ""; - object.languageCode = ""; - } - if (message.text != null && message.hasOwnProperty("text")) + if (options.defaults) + object.allowPlaybackInterruption = false; + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (options.oneofs) + object.source = "text"; + } + if (message.ssml != null && message.hasOwnProperty("ssml")) { + object.ssml = message.ssml; + if (options.oneofs) + object.source = "ssml"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; return object; }; /** - * Converts this Phrase to JSON. + * Converts this OutputAudioText to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @instance * @returns {Object.} JSON object */ - Phrase.prototype.toJSON = function toJSON() { + OutputAudioText.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Phrase + * Gets the default type url for OutputAudioText * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OutputAudioText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText"; }; - return Phrase; + return OutputAudioText; })(); - return SafetySettings; - })(); + ResponseMessage.EndInteraction = (function() { - v3beta1.Changelogs = (function() { + /** + * Properties of an EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IEndInteraction + */ - /** - * Constructs a new Changelogs service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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 - */ - function Changelogs(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Constructs a new EndInteraction. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + */ + function EndInteraction(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]]; + } - (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; + /** + * Creates a new EndInteraction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction instance + */ + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); + }; - /** - * Creates new Changelogs service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.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. - */ - Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Changelogs|listChangelogs}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @typedef ListChangelogsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} [response] ListChangelogsResponse - */ + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IEndInteraction} message EndInteraction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndInteraction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse, request, callback); - }, "name", { value: "ListChangelogs" }); + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls ListChangelogs. - * @function listChangelogs - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest} request ListChangelogsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndInteraction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Changelogs|getChangelog}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @typedef GetChangelogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Changelog} [response] Changelog - */ + /** + * Verifies an EndInteraction message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndInteraction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3beta1.Changelog, request, callback); - }, "name", { value: "GetChangelog" }); + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} EndInteraction + */ + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction) + return object; + return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction(); + }; - /** - * Calls GetChangelog. - * @function getChangelog - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} request GetChangelogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndInteraction.toObject = function toObject() { + return {}; + }; - return Changelogs; - })(); + /** + * Converts this EndInteraction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @instance + * @returns {Object.} JSON object + */ + EndInteraction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v3beta1.ListChangelogsRequest = (function() { + /** + * Gets the default type url for EndInteraction + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndInteraction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction"; + }; - /** - * Properties of a ListChangelogsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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 - */ + return EndInteraction; + })(); - /** - * Constructs a new ListChangelogsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListChangelogsRequest. - * @implements IListChangelogsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + ResponseMessage.PlayAudio = (function() { - /** - * ListChangelogsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.parent = ""; + /** + * Properties of a PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IPlayAudio + * @property {string|null} [audioUri] PlayAudio audioUri + * @property {boolean|null} [allowPlaybackInterruption] PlayAudio allowPlaybackInterruption + */ - /** - * ListChangelogsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.filter = ""; + /** + * Constructs a new PlayAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a PlayAudio. + * @implements IPlayAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + */ + function PlayAudio(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 pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.pageSize = 0; + /** + * PlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.audioUri = ""; - /** - * ListChangelogsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @instance - */ - ListChangelogsRequest.prototype.pageToken = ""; + /** + * PlayAudio allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + */ + PlayAudio.prototype.allowPlaybackInterruption = false; - /** - * Creates a new ListChangelogsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest instance - */ - ListChangelogsRequest.create = function create(properties) { - return new ListChangelogsRequest(properties); - }; + /** + * Creates a new PlayAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio instance + */ + PlayAudio.create = function create(properties) { + return new PlayAudio(properties); + }; - /** - * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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 PlayAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowPlaybackInterruption); + return writer; + }; - /** - * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + /** + * Encodes the specified PlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IPlayAudio} message PlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsRequest} ListChangelogsRequest - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - 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(); + /** + * Decodes a PlayAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioUri = reader.string(); + break; + } + case 2: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a ListChangelogsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @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) { - 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"; - return null; - }; + /** + * Decodes a PlayAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlayAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest - */ - ListChangelogsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Verifies a PlayAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlayAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; - /** - * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} message ListChangelogsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListChangelogsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - }; + /** + * Creates a PlayAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} PlayAudio + */ + PlayAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; - /** - * Converts this ListChangelogsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @instance - * @returns {Object.} JSON object - */ - ListChangelogsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a PlayAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio} message PlayAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlayAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioUri = ""; + object.allowPlaybackInterruption = false; + } + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; - /** - * Gets the default type url for ListChangelogsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest"; - }; + /** + * Converts this PlayAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @instance + * @returns {Object.} JSON object + */ + PlayAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListChangelogsRequest; - })(); + /** + * Gets the default type url for PlayAudio + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlayAudio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio"; + }; - v3beta1.ListChangelogsResponse = (function() { + return PlayAudio; + })(); - /** - * Properties of a ListChangelogsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListChangelogsResponse - * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs - * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken - */ + ResponseMessage.MixedAudio = (function() { - /** - * Constructs a new ListChangelogsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListChangelogsResponse. - * @implements IListChangelogsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse=} [properties] Properties to set - */ - function ListChangelogsResponse(properties) { - this.changelogs = []; - if (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 MixedAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IMixedAudio + * @property {Array.|null} [segments] MixedAudio segments + */ - /** - * ListChangelogsResponse changelogs. - * @member {Array.} changelogs - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @instance - */ - ListChangelogsResponse.prototype.changelogs = $util.emptyArray; + /** + * Constructs a new MixedAudio. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a MixedAudio. + * @implements IMixedAudio + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set + */ + function MixedAudio(properties) { + this.segments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListChangelogsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @instance - */ - ListChangelogsResponse.prototype.nextPageToken = ""; + /** + * MixedAudio segments. + * @member {Array.} segments + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @instance + */ + MixedAudio.prototype.segments = $util.emptyArray; - /** - * Creates a new ListChangelogsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} ListChangelogsResponse instance - */ - ListChangelogsResponse.create = function create(properties) { - return new ListChangelogsResponse(properties); - }; + /** + * Creates a new MixedAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio instance + */ + MixedAudio.create = function create(properties) { + return new MixedAudio(properties); + }; - /** - * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListChangelogsResponse.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.v3beta1.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 MixedAudio message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MixedAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.segments != null && message.segments.length) + for (var i = 0; i < message.segments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.encode(message.segments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse} message ListChangelogsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListChangelogsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MixedAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IMixedAudio} message MixedAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MixedAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsResponse} ListChangelogsResponse - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.changelogs && message.changelogs.length)) - message.changelogs = []; - message.changelogs.push($root.google.cloud.dialogflow.cx.v3beta1.Changelog.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + /** + * Decodes a MixedAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MixedAudio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.segments && message.segments.length)) + message.segments = []; + message.segments.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListChangelogsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} ListChangelogsResponse - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MixedAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MixedAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListChangelogsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @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) { - 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.v3beta1.Changelog.verify(message.changelogs[i]); - if (error) - return "changelogs." + error; + /** + * Verifies a MixedAudio message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MixedAudio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.segments != null && message.hasOwnProperty("segments")) { + if (!Array.isArray(message.segments)) + return "segments: array expected"; + for (var i = 0; i < message.segments.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify(message.segments[i]); + if (error) + return "segments." + error; + } } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + return null; + }; - /** - * Creates a ListChangelogsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} ListChangelogsResponse - */ - ListChangelogsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse(); - if (object.changelogs) { - if (!Array.isArray(object.changelogs)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsResponse.changelogs: object expected"); - message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Changelog.fromObject(object.changelogs[i]); + /** + * Creates a MixedAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} MixedAudio + */ + MixedAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio(); + if (object.segments) { + if (!Array.isArray(object.segments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: array expected"); + message.segments = []; + for (var i = 0; i < object.segments.length; ++i) { + if (typeof object.segments[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments: object expected"); + message.segments[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.fromObject(object.segments[i]); + } } - } - 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.v3beta1.ListChangelogsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Changelog.toObject(message.changelogs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + return message; + }; - /** - * Converts this ListChangelogsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse - * @instance - * @returns {Object.} JSON object - */ - ListChangelogsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a MixedAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio} message MixedAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MixedAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.segments = []; + if (message.segments && message.segments.length) { + object.segments = []; + for (var j = 0; j < message.segments.length; ++j) + object.segments[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.toObject(message.segments[j], options); + } + return object; + }; - /** - * Gets the default type url for ListChangelogsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse"; - }; + /** + * Converts this MixedAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @instance + * @returns {Object.} JSON object + */ + MixedAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListChangelogsResponse; - })(); + /** + * Gets the default type url for MixedAudio + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MixedAudio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio"; + }; - v3beta1.GetChangelogRequest = (function() { + MixedAudio.Segment = (function() { - /** - * Properties of a GetChangelogRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetChangelogRequest - * @property {string|null} [name] GetChangelogRequest name - */ + /** + * Properties of a Segment. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @interface ISegment + * @property {Uint8Array|null} [audio] Segment audio + * @property {string|null} [uri] Segment uri + * @property {boolean|null} [allowPlaybackInterruption] Segment allowPlaybackInterruption + */ - /** - * Constructs a new GetChangelogRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetChangelogRequest. - * @implements IGetChangelogRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * Constructs a new Segment. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + * @classdesc Represents a Segment. + * @implements ISegment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set + */ + function Segment(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.v3beta1.GetChangelogRequest - * @instance - */ - GetChangelogRequest.prototype.name = ""; + /** + * Segment audio. + * @member {Uint8Array|null|undefined} audio + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.audio = null; - /** - * Creates a new GetChangelogRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest instance - */ - GetChangelogRequest.create = function create(properties) { - return new GetChangelogRequest(properties); - }; + /** + * Segment uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.uri = null; - /** - * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Segment allowPlaybackInterruption. + * @member {boolean} allowPlaybackInterruption + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Segment.prototype.allowPlaybackInterruption = false; - /** - * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a GetChangelogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Segment content. + * @member {"audio"|"uri"|undefined} content + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + */ + Object.defineProperty(Segment.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["audio", "uri"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Creates a new Segment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment instance + */ + Segment.create = function create(properties) { + return new Segment(properties); + }; - /** - * Verifies a GetChangelogRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Encodes the specified Segment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.audio); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.allowPlaybackInterruption != null && Object.hasOwnProperty.call(message, "allowPlaybackInterruption")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowPlaybackInterruption); + return writer; + }; - /** - * Creates a GetChangelogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest - */ - GetChangelogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Encodes the specified Segment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.ISegment} message Segment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Segment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Decodes a Segment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audio = reader.bytes(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.allowPlaybackInterruption = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this GetChangelogRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest - * @instance - * @returns {Object.} JSON object - */ - GetChangelogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Segment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Segment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for GetChangelogRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetChangelogRequest"; - }; + /** + * Verifies a Segment message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Segment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.audio != null && message.hasOwnProperty("audio")) { + properties.content = 1; + if (!(message.audio && typeof message.audio.length === "number" || $util.isString(message.audio))) + return "audio: buffer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + if (typeof message.allowPlaybackInterruption !== "boolean") + return "allowPlaybackInterruption: boolean expected"; + return null; + }; - return GetChangelogRequest; + /** + * Creates a Segment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} Segment + */ + Segment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment(); + 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; + if (object.uri != null) + message.uri = String(object.uri); + if (object.allowPlaybackInterruption != null) + message.allowPlaybackInterruption = Boolean(object.allowPlaybackInterruption); + return message; + }; + + /** + * Creates a plain object from a Segment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment} message Segment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Segment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowPlaybackInterruption = false; + 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 (options.oneofs) + object.content = "audio"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.content = "uri"; + } + if (message.allowPlaybackInterruption != null && message.hasOwnProperty("allowPlaybackInterruption")) + object.allowPlaybackInterruption = message.allowPlaybackInterruption; + return object; + }; + + /** + * Converts this Segment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @instance + * @returns {Object.} JSON object + */ + Segment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Segment + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Segment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment"; + }; + + return Segment; + })(); + + return MixedAudio; + })(); + + ResponseMessage.TelephonyTransferCall = (function() { + + /** + * Properties of a TelephonyTransferCall. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface ITelephonyTransferCall + * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber + */ + + /** + * Constructs a new TelephonyTransferCall. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a TelephonyTransferCall. + * @implements ITelephonyTransferCall + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set + */ + function TelephonyTransferCall(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]]; + } + + /** + * TelephonyTransferCall phoneNumber. + * @member {string|null|undefined} phoneNumber + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @instance + */ + TelephonyTransferCall.prototype.phoneNumber = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TelephonyTransferCall endpoint. + * @member {"phoneNumber"|undefined} endpoint + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @instance + */ + Object.defineProperty(TelephonyTransferCall.prototype, "endpoint", { + get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TelephonyTransferCall instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall instance + */ + TelephonyTransferCall.create = function create(properties) { + return new TelephonyTransferCall(properties); + }; + + /** + * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); + return writer; + }; + + /** + * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phoneNumber = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TelephonyTransferCall message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelephonyTransferCall.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + properties.endpoint = 1; + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; + } + return null; + }; + + /** + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + */ + TelephonyTransferCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + return message; + }; + + /** + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelephonyTransferCall.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + object.phoneNumber = message.phoneNumber; + if (options.oneofs) + object.endpoint = "phoneNumber"; + } + return object; + }; + + /** + * Converts this TelephonyTransferCall to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @instance + * @returns {Object.} JSON object + */ + TelephonyTransferCall.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TelephonyTransferCall + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TelephonyTransferCall.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall"; + }; + + return TelephonyTransferCall; + })(); + + ResponseMessage.KnowledgeInfoCard = (function() { + + /** + * Properties of a KnowledgeInfoCard. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @interface IKnowledgeInfoCard + */ + + /** + * Constructs a new KnowledgeInfoCard. + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage + * @classdesc Represents a KnowledgeInfoCard. + * @implements IKnowledgeInfoCard + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard=} [properties] Properties to set + */ + function KnowledgeInfoCard(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 KnowledgeInfoCard instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard instance + */ + KnowledgeInfoCard.create = function create(properties) { + return new KnowledgeInfoCard(properties); + }; + + /** + * Encodes the specified KnowledgeInfoCard message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard} message KnowledgeInfoCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeInfoCard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified KnowledgeInfoCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.IKnowledgeInfoCard} message KnowledgeInfoCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeInfoCard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KnowledgeInfoCard message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeInfoCard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KnowledgeInfoCard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeInfoCard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KnowledgeInfoCard message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KnowledgeInfoCard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a KnowledgeInfoCard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} KnowledgeInfoCard + */ + KnowledgeInfoCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard) + return object; + return new $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard(); + }; + + /** + * Creates a plain object from a KnowledgeInfoCard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard} message KnowledgeInfoCard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KnowledgeInfoCard.toObject = function toObject() { + return {}; + }; + + /** + * Converts this KnowledgeInfoCard to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @instance + * @returns {Object.} JSON object + */ + KnowledgeInfoCard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KnowledgeInfoCard + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KnowledgeInfoCard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResponseMessage.KnowledgeInfoCard"; + }; + + return KnowledgeInfoCard; + })(); + + return ResponseMessage; })(); - v3beta1.Changelog = (function() { + v3beta1.ValidationMessage = (function() { /** - * Properties of a Changelog. + * Properties of a ValidationMessage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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 + * @interface IValidationMessage + * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType|null} [resourceType] ValidationMessage resourceType + * @property {Array.|null} [resources] ValidationMessage resources + * @property {Array.|null} [resourceNames] ValidationMessage resourceNames + * @property {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity|null} [severity] ValidationMessage severity + * @property {string|null} [detail] ValidationMessage detail */ /** - * Constructs a new Changelog. + * Constructs a new ValidationMessage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Changelog. - * @implements IChangelog + * @classdesc Represents a ValidationMessage. + * @implements IValidationMessage * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set */ - function Changelog(properties) { + 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) @@ -105531,159 +107989,137 @@ } /** - * Changelog name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog - * @instance - */ - Changelog.prototype.name = ""; - - /** - * Changelog userEmail. - * @member {string} userEmail - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog - * @instance - */ - Changelog.prototype.userEmail = ""; - - /** - * Changelog displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * ValidationMessage resourceType. + * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType} resourceType + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - Changelog.prototype.displayName = ""; + ValidationMessage.prototype.resourceType = 0; /** - * Changelog action. - * @member {string} action - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * ValidationMessage resources. + * @member {Array.} resources + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - Changelog.prototype.action = ""; + ValidationMessage.prototype.resources = $util.emptyArray; /** - * Changelog type. - * @member {string} type - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * ValidationMessage resourceNames. + * @member {Array.} resourceNames + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - Changelog.prototype.type = ""; + ValidationMessage.prototype.resourceNames = $util.emptyArray; /** - * Changelog resource. - * @member {string} resource - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * ValidationMessage severity. + * @member {google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity} severity + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - Changelog.prototype.resource = ""; + ValidationMessage.prototype.severity = 0; /** - * Changelog createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * ValidationMessage detail. + * @member {string} detail + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance */ - Changelog.prototype.createTime = null; + ValidationMessage.prototype.detail = ""; /** - * Creates a new Changelog instance using the specified properties. + * Creates a new ValidationMessage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog instance + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage instance */ - Changelog.create = function create(properties) { - return new Changelog(properties); + ValidationMessage.create = function create(properties) { + return new ValidationMessage(properties); }; /** - * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Changelog.verify|verify} messages. + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog} message Changelog message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Changelog.encode = function encode(message, writer) { + ValidationMessage.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.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.v3beta1.ResourceName.encode(message.resourceNames[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Changelog.verify|verify} messages. + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ValidationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog} message Changelog message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IValidationMessage} message ValidationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Changelog.encodeDelimited = function encodeDelimited(message, writer) { + ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Changelog message from the specified reader or buffer. + * Decodes a ValidationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage * @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) { + ValidationMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Changelog(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.resourceType = reader.int32(); break; } case 2: { - message.userEmail = reader.string(); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 11: { - message.action = reader.string(); + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push(reader.string()); break; } - case 8: { - message.type = reader.string(); + case 6: { + if (!(message.resourceNames && message.resourceNames.length)) + message.resourceNames = []; + message.resourceNames.push($root.google.cloud.dialogflow.cx.v3beta1.ResourceName.decode(reader, reader.uint32())); break; } case 3: { - message.resource = reader.string(); + message.severity = reader.int32(); break; } case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.detail = reader.string(); break; } default: @@ -105695,282 +108131,588 @@ }; /** - * Decodes a Changelog 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.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage * @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) { + ValidationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Changelog message. + * Verifies a ValidationMessage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @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) { + ValidationMessage.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.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.v3beta1.ResourceName.verify(message.resourceNames[i]); + if (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 Changelog 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.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog + * @returns {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} ValidationMessage */ - Changelog.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Changelog) + ValidationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Changelog.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; + } + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.ValidationMessage.resourceNames: object expected"); + message.resourceNames[i] = $root.google.cloud.dialogflow.cx.v3beta1.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 Changelog message. Also converts values to other types if specified. + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Changelog} message Changelog + * @param {google.cloud.dialogflow.cx.v3beta1.ValidationMessage} message ValidationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Changelog.toObject = function toObject(message, options) { + ValidationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.resourceNames = []; + } if (options.defaults) { - object.name = ""; - object.userEmail = ""; - object.resource = ""; - object.createTime = null; - object.displayName = ""; - object.type = ""; - object.action = ""; + 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.v3beta1.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResourceName.toObject(message.resourceNames[j], options); } - 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; return object; }; /** - * Converts this Changelog to JSON. + * Converts this ValidationMessage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @instance * @returns {Object.} JSON object */ - Changelog.prototype.toJSON = function toJSON() { + ValidationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Changelog + * Gets the default type url for ValidationMessage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @memberof google.cloud.dialogflow.cx.v3beta1.ValidationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Changelog"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ValidationMessage"; }; - return Changelog; - })(); - - v3beta1.Deployments = (function() { - - /** - * Constructs a new Deployments service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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); - } - - (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; - /** - * Creates new Deployments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.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. + * ResourceType enum. + * @name google.cloud.dialogflow.cx.v3beta1.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 */ - Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + 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; + })(); /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Deployments|listDeployments}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments - * @typedef ListDeploymentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} [response] ListDeploymentsResponse + * Severity enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; + })(); + + v3beta1.ResourceName = (function() { /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * Properties of a ResourceName. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IResourceName + * @property {string|null} [name] ResourceName name + * @property {string|null} [displayName] ResourceName displayName + */ + + /** + * Constructs a new ResourceName. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ResourceName. + * @implements IResourceName + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set + */ + 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]]; + } + + /** + * ResourceName name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse, request, callback); - }, "name", { value: "ListDeployments" }); + ResourceName.prototype.name = ""; /** - * Calls ListDeployments. - * @function listDeployments - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * ResourceName displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ResourceName.prototype.displayName = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Deployments|getDeployment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments - * @typedef GetDeploymentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment} [response] Deployment + * Creates a new ResourceName instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName instance */ + ResourceName.create = function create(properties) { + return new ResourceName(properties); + }; /** - * Calls GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeploymentCallback} callback Node-style callback called with the error, if any, and Deployment - * @returns {undefined} - * @variation 1 + * Encodes the specified ResourceName message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Deployments.prototype.getDeployment = function getDeployment(request, callback) { - return this.rpcCall(getDeployment, $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Deployment, request, callback); - }, "name", { value: "GetDeployment" }); + 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 GetDeployment. - * @function getDeployment - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * Encodes the specified ResourceName message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ResourceName.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IResourceName} message ResourceName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceName message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResourceName} ResourceName + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ResourceName(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceName message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @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) { + 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"; + return null; + }; + + /** + * Creates a ResourceName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ResourceName} ResourceName + */ + ResourceName.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ResourceName) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 ResourceName message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ResourceName} message ResourceName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceName.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + return object; + }; + + /** + * Converts this ResourceName to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ResourceName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Deployments; + /** + * Gets the default type url for ResourceName + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ResourceName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ResourceName"; + }; + + return ResourceName; })(); - v3beta1.Deployment = (function() { + v3beta1.GenerativeSettings = (function() { /** - * Properties of a Deployment. + * Properties of a GenerativeSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeployment - * @property {string|null} [name] Deployment name - * @property {string|null} [flowVersion] Deployment flowVersion - * @property {google.cloud.dialogflow.cx.v3beta1.Deployment.State|null} [state] Deployment state - * @property {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult|null} [result] Deployment result - * @property {google.protobuf.ITimestamp|null} [startTime] Deployment startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Deployment endTime + * @interface IGenerativeSettings + * @property {string|null} [name] GenerativeSettings name + * @property {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings|null} [fallbackSettings] GenerativeSettings fallbackSettings + * @property {google.cloud.dialogflow.cx.v3beta1.ISafetySettings|null} [generativeSafetySettings] GenerativeSettings generativeSafetySettings + * @property {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings|null} [knowledgeConnectorSettings] GenerativeSettings knowledgeConnectorSettings + * @property {string|null} [languageCode] GenerativeSettings languageCode */ /** - * Constructs a new Deployment. + * Constructs a new GenerativeSettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a Deployment. - * @implements IDeployment + * @classdesc Represents a GenerativeSettings. + * @implements IGenerativeSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings=} [properties] Properties to set */ - function Deployment(properties) { + function GenerativeSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105978,145 +108720,131 @@ } /** - * Deployment name. + * GenerativeSettings name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment - * @instance - */ - Deployment.prototype.name = ""; - - /** - * Deployment flowVersion. - * @member {string} flowVersion - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance */ - Deployment.prototype.flowVersion = ""; + GenerativeSettings.prototype.name = ""; /** - * Deployment state. - * @member {google.cloud.dialogflow.cx.v3beta1.Deployment.State} state - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * GenerativeSettings fallbackSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings|null|undefined} fallbackSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance */ - Deployment.prototype.state = 0; + GenerativeSettings.prototype.fallbackSettings = null; /** - * Deployment result. - * @member {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * GenerativeSettings generativeSafetySettings. + * @member {google.cloud.dialogflow.cx.v3beta1.ISafetySettings|null|undefined} generativeSafetySettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance */ - Deployment.prototype.result = null; + GenerativeSettings.prototype.generativeSafetySettings = null; /** - * Deployment startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * GenerativeSettings knowledgeConnectorSettings. + * @member {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings|null|undefined} knowledgeConnectorSettings + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance */ - Deployment.prototype.startTime = null; + GenerativeSettings.prototype.knowledgeConnectorSettings = null; /** - * Deployment endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * GenerativeSettings languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance */ - Deployment.prototype.endTime = null; + GenerativeSettings.prototype.languageCode = ""; /** - * Creates a new Deployment instance using the specified properties. + * Creates a new GenerativeSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings instance */ - Deployment.create = function create(properties) { - return new Deployment(properties); + GenerativeSettings.create = function create(properties) { + return new GenerativeSettings(properties); }; /** - * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.verify|verify} messages. + * Encodes the specified GenerativeSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment} message Deployment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings} message GenerativeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deployment.encode = function encode(message, writer) { + GenerativeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.fallbackSettings != null && Object.hasOwnProperty.call(message, "fallbackSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 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.v3beta1.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(); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.knowledgeConnectorSettings != null && Object.hasOwnProperty.call(message, "knowledgeConnectorSettings")) + $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.encode(message.knowledgeConnectorSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.verify|verify} messages. + * Encodes the specified GenerativeSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment} message Deployment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerativeSettings} message GenerativeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deployment.encodeDelimited = function encodeDelimited(message, writer) { + GenerativeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Deployment message from the specified reader or buffer. + * Decodes a GenerativeSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings * @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) { + GenerativeSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { + case 5: { message.name = reader.string(); break; } - case 2: { - message.flowVersion = reader.string(); + case 1: { + message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.decode(reader, reader.uint32()); break; } case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.result = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.decode(reader, reader.uint32()); + message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.decode(reader, reader.uint32()); break; } - case 5: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 7: { + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.decode(reader, reader.uint32()); break; } - case 6: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: { + message.languageCode = reader.string(); break; } default: @@ -106128,224 +108856,169 @@ }; /** - * Decodes a Deployment 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.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings * @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) { + GenerativeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Deployment message. + * Verifies a GenerativeSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @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) { + GenerativeSettings.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) { - default: - return "state: 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.v3beta1.Deployment.Result.verify(message.result); + if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.verify(message.fallbackSettings); if (error) - return "result." + error; + return "fallbackSettings." + error; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.verify(message.generativeSafetySettings); if (error) - return "startTime." + error; + return "generativeSafetySettings." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.verify(message.knowledgeConnectorSettings); if (error) - return "endTime." + error; + return "knowledgeConnectorSettings." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a Deployment 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.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} GenerativeSettings */ - Deployment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Deployment) + GenerativeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings(); 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.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Deployment.result: object expected"); - message.result = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.fromObject(object.result); + if (object.fallbackSettings != null) { + if (typeof object.fallbackSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.fallbackSettings: object expected"); + message.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.fromObject(object.fallbackSettings); } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Deployment.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + if (object.generativeSafetySettings != null) { + if (typeof object.generativeSafetySettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.generativeSafetySettings: object expected"); + message.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.fromObject(object.generativeSafetySettings); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Deployment.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.knowledgeConnectorSettings != null) { + if (typeof object.knowledgeConnectorSettings !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.knowledgeConnectorSettings: object expected"); + message.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.fromObject(object.knowledgeConnectorSettings); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a Deployment 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.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment} message Deployment + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings} message GenerativeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Deployment.toObject = function toObject(message, options) { + GenerativeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.fallbackSettings = null; + object.generativeSafetySettings = null; + object.languageCode = ""; object.name = ""; - object.flowVersion = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.result = null; - object.startTime = null; - object.endTime = null; + object.knowledgeConnectorSettings = null; } + if (message.fallbackSettings != null && message.hasOwnProperty("fallbackSettings")) + object.fallbackSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.toObject(message.fallbackSettings, options); + if (message.generativeSafetySettings != null && message.hasOwnProperty("generativeSafetySettings")) + object.generativeSafetySettings = $root.google.cloud.dialogflow.cx.v3beta1.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.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.v3beta1.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.Deployment.State[message.state] : message.state; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.dialogflow.cx.v3beta1.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.knowledgeConnectorSettings != null && message.hasOwnProperty("knowledgeConnectorSettings")) + object.knowledgeConnectorSettings = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.toObject(message.knowledgeConnectorSettings, options); return object; }; /** - * Converts this Deployment to JSON. + * Converts this GenerativeSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @instance * @returns {Object.} JSON object */ - Deployment.prototype.toJSON = function toJSON() { + GenerativeSettings.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 GenerativeSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerativeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Deployment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GenerativeSettings"; }; - /** - * State enum. - * @name google.cloud.dialogflow.cx.v3beta1.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() { + GenerativeSettings.FallbackSettings = (function() { /** - * Properties of a Result. - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment - * @interface IResult - * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults - * @property {string|null} [experiment] Result experiment + * Properties of a FallbackSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + * @interface IFallbackSettings + * @property {string|null} [selectedPrompt] FallbackSettings selectedPrompt + * @property {Array.|null} [promptTemplates] FallbackSettings promptTemplates */ /** - * Constructs a new Result. - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment - * @classdesc Represents a Result. - * @implements IResult + * Constructs a new FallbackSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + * @classdesc Represents a FallbackSettings. + * @implements IFallbackSettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings=} [properties] Properties to set */ - function Result(properties) { - this.deploymentTestResults = []; + function FallbackSettings(properties) { + this.promptTemplates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106353,92 +109026,92 @@ } /** - * Result deploymentTestResults. - * @member {Array.} deploymentTestResults - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * FallbackSettings selectedPrompt. + * @member {string} selectedPrompt + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @instance */ - Result.prototype.deploymentTestResults = $util.emptyArray; + FallbackSettings.prototype.selectedPrompt = ""; /** - * Result experiment. - * @member {string} experiment - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * FallbackSettings promptTemplates. + * @member {Array.} promptTemplates + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @instance */ - Result.prototype.experiment = ""; + FallbackSettings.prototype.promptTemplates = $util.emptyArray; /** - * Creates a new Result instance using the specified properties. + * Creates a new FallbackSettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.Result} Result instance + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings instance */ - Result.create = function create(properties) { - return new Result(properties); + FallbackSettings.create = function create(properties) { + return new FallbackSettings(properties); }; /** - * Encodes the specified Result message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.Result.verify|verify} messages. + * Encodes the specified FallbackSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encode = function encode(message, writer) { + FallbackSettings.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.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.encode(message.promptTemplates[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.Result.verify|verify} messages. + * Encodes the specified FallbackSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult} message Result message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IFallbackSettings} message FallbackSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encodeDelimited = function encodeDelimited(message, writer) { + FallbackSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Result message from the specified reader or buffer. + * Decodes a FallbackSettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings * @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) { + FallbackSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.deploymentTestResults && message.deploymentTestResults.length)) - message.deploymentTestResults = []; - message.deploymentTestResults.push(reader.string()); + case 3: { + message.selectedPrompt = reader.string(); break; } - case 2: { - message.experiment = reader.string(); + case 4: { + if (!(message.promptTemplates && message.promptTemplates.length)) + message.promptTemplates = []; + message.promptTemplates.push($root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.decode(reader, reader.uint32())); break; } default: @@ -106450,644 +109123,698 @@ }; /** - * Decodes a Result message from the specified reader or buffer, length delimited. + * Decodes a FallbackSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings * @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) { + FallbackSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Result message. + * Verifies a FallbackSettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @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) { + FallbackSettings.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.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify(message.promptTemplates[i]); + if (error) + return "promptTemplates." + error; + } } - if (message.experiment != null && message.hasOwnProperty("experiment")) - if (!$util.isString(message.experiment)) - return "experiment: string expected"; return null; }; /** - * Creates a Result 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. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.Result} Result + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} FallbackSettings */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + FallbackSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(); - if (object.deploymentTestResults) { - if (!Array.isArray(object.deploymentTestResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Deployment.Result.deploymentTestResults: array expected"); - message.deploymentTestResults = []; - for (var i = 0; i < object.deploymentTestResults.length; ++i) - message.deploymentTestResults[i] = String(object.deploymentTestResults[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.GenerativeSettings.FallbackSettings.promptTemplates: object expected"); + message.promptTemplates[i] = $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.fromObject(object.promptTemplates[i]); + } } - if (object.experiment != null) - message.experiment = String(object.experiment); return message; }; /** - * Creates a plain object from a Result message. Also converts values to other types if specified. + * Creates a plain object from a FallbackSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.Result} message Result + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings} message FallbackSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Result.toObject = function toObject(message, options) { + FallbackSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.deploymentTestResults = []; + object.promptTemplates = []; 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]; + 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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.toObject(message.promptTemplates[j], options); } - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = message.experiment; return object; }; /** - * Converts this Result to JSON. + * Converts this FallbackSettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @instance * @returns {Object.} JSON object */ - Result.prototype.toJSON = function toJSON() { + FallbackSettings.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 FallbackSettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FallbackSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Deployment.Result"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings"; }; - return Result; - })(); - - return Deployment; - })(); - - v3beta1.ListDeploymentsRequest = (function() { + FallbackSettings.PromptTemplate = (function() { - /** - * Properties of a ListDeploymentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListDeploymentsRequest - * @property {string|null} [parent] ListDeploymentsRequest parent - * @property {number|null} [pageSize] ListDeploymentsRequest pageSize - * @property {string|null} [pageToken] ListDeploymentsRequest pageToken - */ + /** + * Properties of a PromptTemplate. + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @interface IPromptTemplate + * @property {string|null} [displayName] PromptTemplate displayName + * @property {string|null} [promptText] PromptTemplate promptText + * @property {boolean|null} [frozen] PromptTemplate frozen + */ - /** - * Constructs a new ListDeploymentsRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListDeploymentsRequest. - * @implements IListDeploymentsRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * Constructs a new PromptTemplate. + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings + * @classdesc Represents a PromptTemplate. + * @implements IPromptTemplate + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - /** - * ListDeploymentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.parent = ""; + /** + * PromptTemplate displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.displayName = ""; - /** - * ListDeploymentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageSize = 0; + /** + * PromptTemplate promptText. + * @member {string} promptText + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.promptText = ""; - /** - * ListDeploymentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @instance - */ - ListDeploymentsRequest.prototype.pageToken = ""; + /** + * PromptTemplate frozen. + * @member {boolean} frozen + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + */ + PromptTemplate.prototype.frozen = false; - /** - * Creates a new ListDeploymentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest instance - */ - ListDeploymentsRequest.create = function create(properties) { - return new ListDeploymentsRequest(properties); - }; + /** + * Creates a new PromptTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.IPromptTemplate=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate instance + */ + PromptTemplate.create = function create(properties) { + return new PromptTemplate(properties); + }; - /** - * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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 PromptTemplate message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; - /** - * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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 PromptTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; + /** + * Decodes a PromptTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } } - case 3: { - message.pageToken = reader.string(); - break; + return message; + }; + + /** + * Decodes a PromptTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; + + /** + * Verifies a PromptTemplate message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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 PromptTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate} PromptTemplate + */ + PromptTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 a plain object from a PromptTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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; + }; - /** - * Decodes a ListDeploymentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Converts this PromptTemplate to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate + * @instance + * @returns {Object.} JSON object + */ + PromptTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a ListDeploymentsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Gets the default type url for PromptTemplate + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GenerativeSettings.FallbackSettings.PromptTemplate"; + }; - /** - * Creates a ListDeploymentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest - */ - ListDeploymentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; - }; + return PromptTemplate; + })(); - /** - * Creates a plain object from a ListDeploymentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + return FallbackSettings; + })(); - /** - * Converts this ListDeploymentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDeploymentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + GenerativeSettings.KnowledgeConnectorSettings = (function() { - /** - * Gets the default type url for ListDeploymentsRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListDeploymentsRequest"; - }; + /** + * Properties of a KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.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 + */ - return ListDeploymentsRequest; - })(); + /** + * Constructs a new KnowledgeConnectorSettings. + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings + * @classdesc Represents a KnowledgeConnectorSettings. + * @implements IKnowledgeConnectorSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - v3beta1.ListDeploymentsResponse = (function() { + /** + * KnowledgeConnectorSettings business. + * @member {string} business + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.business = ""; - /** - * Properties of a ListDeploymentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListDeploymentsResponse - * @property {Array.|null} [deployments] ListDeploymentsResponse deployments - * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken - */ + /** + * KnowledgeConnectorSettings agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agent = ""; - /** - * Constructs a new ListDeploymentsResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListDeploymentsResponse. - * @implements IListDeploymentsResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * KnowledgeConnectorSettings agentIdentity. + * @member {string} agentIdentity + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agentIdentity = ""; - /** - * ListDeploymentsResponse deployments. - * @member {Array.} deployments - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.deployments = $util.emptyArray; + /** + * KnowledgeConnectorSettings businessDescription. + * @member {string} businessDescription + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.businessDescription = ""; - /** - * ListDeploymentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @instance - */ - ListDeploymentsResponse.prototype.nextPageToken = ""; + /** + * KnowledgeConnectorSettings agentScope. + * @member {string} agentScope + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + */ + KnowledgeConnectorSettings.prototype.agentScope = ""; - /** - * Creates a new ListDeploymentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse instance - */ - ListDeploymentsResponse.create = function create(properties) { - return new ListDeploymentsResponse(properties); - }; + /** + * Creates a new KnowledgeConnectorSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.IKnowledgeConnectorSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings instance + */ + KnowledgeConnectorSettings.create = function create(properties) { + return new KnowledgeConnectorSettings(properties); + }; - /** - * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 KnowledgeConnectorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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); + return writer; + }; - /** - * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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 KnowledgeConnectorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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 ListDeploymentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.deployments && message.deployments.length)) - message.deployments = []; - message.deployments.push($root.google.cloud.dialogflow.cx.v3beta1.Deployment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + default: + reader.skipType(tag & 7); 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.v3beta1.ListDeploymentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Decodes a KnowledgeConnectorSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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 ListDeploymentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; - }; + /** + * Verifies a KnowledgeConnectorSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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"; + return null; + }; - /** - * Creates a ListDeploymentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse - */ - ListDeploymentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(); - if (object.deployments) { - if (!Array.isArray(object.deployments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListDeploymentsResponse.deployments: object expected"); - message.deployments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.fromObject(object.deployments[i]); + /** + * Creates a KnowledgeConnectorSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings} KnowledgeConnectorSettings + */ + KnowledgeConnectorSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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); + 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.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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 = ""; } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + 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; + return object; + }; - /** - * Creates a plain object from a ListDeploymentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Deployment.toObject(message.deployments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this KnowledgeConnectorSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GenerativeSettings.KnowledgeConnectorSettings + * @instance + * @returns {Object.} JSON object + */ + KnowledgeConnectorSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListDeploymentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListDeploymentsResponse.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.v3beta1.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.v3beta1.GenerativeSettings.KnowledgeConnectorSettings"; + }; - /** - * Gets the default type url for ListDeploymentsResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse"; - }; + return KnowledgeConnectorSettings; + })(); - return ListDeploymentsResponse; + return GenerativeSettings; })(); - v3beta1.GetDeploymentRequest = (function() { + v3beta1.SafetySettings = (function() { /** - * Properties of a GetDeploymentRequest. + * Properties of a SafetySettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetDeploymentRequest - * @property {string|null} [name] GetDeploymentRequest name + * @interface ISafetySettings + * @property {Array.|null} [bannedPhrases] SafetySettings bannedPhrases */ /** - * Constructs a new GetDeploymentRequest. + * Constructs a new SafetySettings. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetDeploymentRequest. - * @implements IGetDeploymentRequest + * @classdesc Represents a SafetySettings. + * @implements ISafetySettings * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ISafetySettings=} [properties] Properties to set */ - function GetDeploymentRequest(properties) { + function SafetySettings(properties) { + this.bannedPhrases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107095,75 +109822,78 @@ } /** - * GetDeploymentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * SafetySettings bannedPhrases. + * @member {Array.} bannedPhrases + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @instance */ - GetDeploymentRequest.prototype.name = ""; + SafetySettings.prototype.bannedPhrases = $util.emptyArray; /** - * Creates a new GetDeploymentRequest instance using the specified properties. + * Creates a new SafetySettings instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISafetySettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings instance */ - GetDeploymentRequest.create = function create(properties) { - return new GetDeploymentRequest(properties); + SafetySettings.create = function create(properties) { + return new SafetySettings(properties); }; /** - * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified SafetySettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISafetySettings} message SafetySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encode = function encode(message, writer) { + SafetySettings.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.bannedPhrases != null && message.bannedPhrases.length) + for (var i = 0; i < message.bannedPhrases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.encode(message.bannedPhrases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.verify|verify} messages. + * Encodes the specified SafetySettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ISafetySettings} message SafetySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { + SafetySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeploymentRequest message from the specified reader or buffer. + * Decodes a SafetySettings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings * @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) { + SafetySettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.bannedPhrases && message.bannedPhrases.length)) + message.bannedPhrases = []; + message.bannedPhrases.push($root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.decode(reader, reader.uint32())); break; } default: @@ -107175,511 +109905,835 @@ }; /** - * Decodes a GetDeploymentRequest 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.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings * @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) { + SafetySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeploymentRequest message. + * Verifies a SafetySettings message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @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) { + 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.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.v3beta1.SafetySettings.Phrase.verify(message.bannedPhrases[i]); + if (error) + return "bannedPhrases." + error; + } + } return null; }; /** - * Creates a GetDeploymentRequest 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.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings} SafetySettings */ - GetDeploymentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) + SafetySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings(); + if (object.bannedPhrases) { + if (!Array.isArray(object.bannedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.bannedPhrases: object expected"); + message.bannedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.fromObject(object.bannedPhrases[i]); + } + } return message; }; /** - * Creates a plain object from a GetDeploymentRequest 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.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} message GetDeploymentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings} message SafetySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeploymentRequest.toObject = function toObject(message, options) { + SafetySettings.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.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.v3beta1.SafetySettings.Phrase.toObject(message.bannedPhrases[j], options); + } return object; }; /** - * Converts this GetDeploymentRequest to JSON. + * Converts this SafetySettings to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @instance * @returns {Object.} JSON object */ - GetDeploymentRequest.prototype.toJSON = function toJSON() { + SafetySettings.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 SafetySettings * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SafetySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SafetySettings"; }; - return GetDeploymentRequest; - })(); + SafetySettings.Phrase = (function() { - v3beta1.EntityTypes = (function() { + /** + * Properties of a Phrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings + * @interface IPhrase + * @property {string|null} [text] Phrase text + * @property {string|null} [languageCode] Phrase languageCode + */ - /** - * Constructs a new EntityTypes service. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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); - } + /** + * Constructs a new Phrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings + * @classdesc Represents a Phrase. + * @implements IPhrase + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; + /** + * Phrase text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @instance + */ + Phrase.prototype.text = ""; - /** - * Creates new EntityTypes service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.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); - }; + /** + * Phrase languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @instance + */ + Phrase.prototype.languageCode = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|listEntityTypes}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef ListEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse - */ + /** + * Creates a new Phrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SafetySettings.IPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase instance + */ + Phrase.create = function create(properties) { + return new Phrase(properties); + }; - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse - * @returns {undefined} - * @variation 1 + /** + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.Phrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.SafetySettings.Phrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.SafetySettings.Phrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase} Phrase + */ + Phrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SafetySettings.Phrase) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SafetySettings.Phrase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.SafetySettings.Phrase"; + }; + + return Phrase; + })(); + + return SafetySettings; + })(); + + v3beta1.Changelogs = (function() { + + /** + * Constructs a new Changelogs service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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 */ - Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { - return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, request, callback); - }, "name", { value: "ListEntityTypes" }); + function Changelogs(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Changelogs.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Changelogs; /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates new Changelogs service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.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. */ + Changelogs.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|getEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef GetEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Changelogs|listChangelogs}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs + * @typedef ListChangelogsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} [response] ListChangelogsResponse */ /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogsCallback} callback Node-style callback called with the error, if any, and ListChangelogsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { - return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "GetEntityType" }); + Object.defineProperty(Changelogs.prototype.listChangelogs = function listChangelogs(request, callback) { + return this.rpcCall(listChangelogs, $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse, request, callback); + }, "name", { value: "ListChangelogs" }); /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * Calls ListChangelogs. + * @function listChangelogs + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest} request ListChangelogsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|createEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef CreateEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Changelogs|getChangelog}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs + * @typedef GetChangelogCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.Changelog} [response] Changelog */ /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Changelogs.GetChangelogCallback} callback Node-style callback called with the error, if any, and Changelog * @returns {undefined} * @variation 1 */ - Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { - return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "CreateEntityType" }); + Object.defineProperty(Changelogs.prototype.getChangelog = function getChangelog(request, callback) { + return this.rpcCall(getChangelog, $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest, $root.google.cloud.dialogflow.cx.v3beta1.Changelog, request, callback); + }, "name", { value: "GetChangelog" }); /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * Calls GetChangelog. + * @function getChangelog + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelogs * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} request GetChangelogRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ + return Changelogs; + })(); + + v3beta1.ListChangelogsRequest = (function() { + /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|updateEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef UpdateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType + * Properties of a ListChangelogsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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 */ /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 + * Constructs a new ListChangelogsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListChangelogsRequest. + * @implements IListChangelogsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest=} [properties] Properties to set */ - Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { - return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); - }, "name", { value: "UpdateEntityType" }); + 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]]; + } /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * ListChangelogsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListChangelogsRequest.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|deleteEntityType}. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes - * @typedef DeleteEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * ListChangelogsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @instance */ + ListChangelogsRequest.prototype.filter = ""; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * ListChangelogsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntityType" }); + ListChangelogsRequest.prototype.pageSize = 0; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * ListChangelogsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListChangelogsRequest.prototype.pageToken = ""; - return EntityTypes; - })(); + /** + * Creates a new ListChangelogsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest instance + */ + ListChangelogsRequest.create = function create(properties) { + return new ListChangelogsRequest(properties); + }; - v3beta1.EntityType = (function() { + /** + * Encodes the specified ListChangelogsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; /** - * Properties of an EntityType. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IEntityType - * @property {string|null} [name] EntityType name - * @property {string|null} [displayName] EntityType displayName - * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null} [kind] EntityType kind - * @property {google.cloud.dialogflow.cx.v3beta1.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 + * Encodes the specified ListChangelogsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; /** - * Constructs a new EntityType. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an EntityType. - * @implements IEntityType - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set + * Decodes a ListChangelogsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsRequest} ListChangelogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - 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) - this[keys[i]] = properties[keys[i]]; - } + ListChangelogsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance + * Decodes a ListChangelogsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityType.prototype.name = ""; + ListChangelogsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance + * Verifies a ListChangelogsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityType.prototype.displayName = ""; + ListChangelogsRequest.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"; + return null; + }; /** - * EntityType kind. - * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind} kind - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance + * Creates a ListChangelogsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} ListChangelogsRequest */ - EntityType.prototype.kind = 0; + ListChangelogsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; + }; /** - * EntityType autoExpansionMode. - * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode} autoExpansionMode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance + * Creates a plain object from a ListChangelogsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest} message ListChangelogsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - EntityType.prototype.autoExpansionMode = 0; + ListChangelogsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + }; /** - * EntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * Converts this ListChangelogsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest * @instance + * @returns {Object.} JSON object */ - EntityType.prototype.entities = $util.emptyArray; + ListChangelogsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * EntityType excludedPhrases. - * @member {Array.} excludedPhrases - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @instance + * Gets the default type url for ListChangelogsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - EntityType.prototype.excludedPhrases = $util.emptyArray; + ListChangelogsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest"; + }; + + return ListChangelogsRequest; + })(); + + v3beta1.ListChangelogsResponse = (function() { /** - * EntityType enableFuzzyExtraction. - * @member {boolean} enableFuzzyExtraction - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * Properties of a ListChangelogsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListChangelogsResponse + * @property {Array.|null} [changelogs] ListChangelogsResponse changelogs + * @property {string|null} [nextPageToken] ListChangelogsResponse nextPageToken + */ + + /** + * Constructs a new ListChangelogsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListChangelogsResponse. + * @implements IListChangelogsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse=} [properties] Properties to set + */ + function ListChangelogsResponse(properties) { + this.changelogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListChangelogsResponse changelogs. + * @member {Array.} changelogs + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @instance */ - EntityType.prototype.enableFuzzyExtraction = false; + ListChangelogsResponse.prototype.changelogs = $util.emptyArray; /** - * EntityType redact. - * @member {boolean} redact - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * ListChangelogsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListChangelogsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EntityType.verify|verify} messages. + * Encodes the specified ListChangelogsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + ListChangelogsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse(); while (reader.pos < end) { var tag = reader.uint32(); 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.v3beta1.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.v3beta1.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.v3beta1.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: @@ -107691,862 +110745,224 @@ }; /** - * 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.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} ListChangelogsResponse */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType) + ListChangelogsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; - } - 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.v3beta1.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.v3beta1.EntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.fromObject(object.entities[i]); - } - } - if (object.excludedPhrases) { - if (!Array.isArray(object.excludedPhrases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.excludedPhrases: object expected"); - message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.fromObject(object.excludedPhrases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse(); + if (object.changelogs) { + if (!Array.isArray(object.changelogs)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListChangelogsResponse.changelogs: object expected"); + message.changelogs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Changelog.fromObject(object.changelogs[i]); } } - if (object.enableFuzzyExtraction != null) - message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); - if (object.redact != null) - message.redact = Boolean(object.redact); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * Creates a plain object from a ListChangelogsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} message EntityType + * @param {google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse} message ListChangelogsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityType.toObject = function toObject(message, options) { + ListChangelogsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.entities = []; - object.excludedPhrases = []; - } - 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.v3beta1.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.ExcludedPhrase.toObject(message.excludedPhrases[j], options); + 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.v3beta1.Changelog.toObject(message.changelogs[j], options); } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - object.enableFuzzyExtraction = message.enableFuzzyExtraction; - if (message.redact != null && message.hasOwnProperty("redact")) - object.redact = message.redact; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this EntityType to JSON. + * Converts this ListChangelogsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @instance * @returns {Object.} JSON object */ - EntityType.prototype.toJSON = function toJSON() { + ListChangelogsResponse.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 ListChangelogsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChangelogsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EntityType"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse"; }; + return ListChangelogsResponse; + })(); + + v3beta1.GetChangelogRequest = (function() { + /** - * Kind enum. - * @name google.cloud.dialogflow.cx.v3beta1.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 GetChangelogRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetChangelogRequest + * @property {string|null} [name] GetChangelogRequest name */ - 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.v3beta1.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 GetChangelogRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetChangelogRequest. + * @implements IGetChangelogRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest=} [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() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @interface IEntity - * @property {string|null} [value] Entity value - * @property {Array.|null} [synonyms] Entity synonyms - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } - - /** - * Entity value. - * @member {string} value - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @instance - */ - Entity.prototype.value = ""; - - /** - * Entity synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @instance - */ - Entity.prototype.synonyms = $util.emptyArray; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); - while (reader.pos < end) { - var tag = 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; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EntityType.Entity"; - }; - - return Entity; - })(); - - EntityType.ExcludedPhrase = (function() { - - /** - * Properties of an ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @interface IExcludedPhrase - * @property {string|null} [value] ExcludedPhrase value - */ - - /** - * Constructs a new ExcludedPhrase. - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType - * @classdesc Represents an ExcludedPhrase. - * @implements IExcludedPhrase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.ExcludedPhrase - * @instance - */ - ExcludedPhrase.prototype.value = ""; - - /** - * Creates a new ExcludedPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase - */ - ExcludedPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.ExcludedPhrase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EntityType.ExcludedPhrase"; - }; - - return ExcludedPhrase; - })(); - - return EntityType; - })(); - - v3beta1.ListEntityTypesRequest = (function() { - - /** - * Properties of a ListEntityTypesRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a ListEntityTypesRequest. - * @implements IListEntityTypesRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.parent = ""; - - /** - * ListEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.languageCode = ""; - - /** - * ListEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest - * @instance - */ - ListEntityTypesRequest.prototype.pageSize = 0; + 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]]; + } /** - * ListEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * GetChangelogRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @instance */ - ListEntityTypesRequest.prototype.pageToken = ""; + GetChangelogRequest.prototype.name = ""; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new GetChangelogRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest instance */ - ListEntityTypesRequest.create = function create(properties) { - return new ListEntityTypesRequest(properties); + GetChangelogRequest.create = function create(properties) { + return new GetChangelogRequest(properties); }; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified GetChangelogRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encode = function encode(message, writer) { + GetChangelogRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified GetChangelogRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetChangelogRequest} message GetChangelogRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetChangelogRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a GetChangelogRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest * @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) { + GetChangelogRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest(); while (reader.pos < end) { var tag = reader.uint32(); 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(); + message.name = reader.string(); break; } default: @@ -108558,149 +110974,128 @@ }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetChangelogRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest * @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) { + GetChangelogRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a GetChangelogRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @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) { + GetChangelogRequest.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListEntityTypesRequest 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. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} GetChangelogRequest */ - ListEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) + GetChangelogRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetChangelogRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest} message GetChangelogRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesRequest.toObject = function toObject(message, options) { + GetChangelogRequest.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; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this GetChangelogRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesRequest.prototype.toJSON = function toJSON() { + GetChangelogRequest.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 GetChangelogRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntityTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetChangelogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest"; }; - return ListEntityTypesRequest; + return GetChangelogRequest; })(); - v3beta1.ListEntityTypesResponse = (function() { + v3beta1.Changelog = (function() { /** - * Properties of a ListEntityTypesResponse. + * Properties of a Changelog. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListEntityTypesResponse - * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes - * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken + * @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 */ /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new Changelog. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListEntityTypesResponse. - * @implements IListEntityTypesResponse + * @classdesc Represents a Changelog. + * @implements IChangelog * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog=} [properties] Properties to set */ - function ListEntityTypesResponse(properties) { - this.entityTypes = []; + function Changelog(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108708,92 +111103,159 @@ } /** - * ListEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * Changelog name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @instance */ - ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; + Changelog.prototype.name = ""; /** - * ListEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * Changelog userEmail. + * @member {string} userEmail + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @instance */ - ListEntityTypesResponse.prototype.nextPageToken = ""; + Changelog.prototype.userEmail = ""; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Changelog displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @instance + */ + Changelog.prototype.displayName = ""; + + /** + * Changelog action. + * @member {string} action + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @instance + */ + Changelog.prototype.action = ""; + + /** + * Changelog type. + * @member {string} type + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @instance + */ + Changelog.prototype.type = ""; + + /** + * Changelog resource. + * @member {string} resource + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @instance + */ + Changelog.prototype.resource = ""; + + /** + * Changelog createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog + * @instance + */ + Changelog.prototype.createTime = null; + + /** + * Creates a new Changelog instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog instance */ - ListEntityTypesResponse.create = function create(properties) { - return new ListEntityTypesResponse(properties); + Changelog.create = function create(properties) { + return new Changelog(properties); }; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified Changelog message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Changelog.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encode = function encode(message, writer) { + Changelog.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.v3beta1.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); + 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); return writer; }; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified Changelog message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Changelog.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IChangelog} message Changelog message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Changelog.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes a Changelog message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog * @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) { + Changelog.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Changelog(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.entityTypes && message.entityTypes.length)) - message.entityTypes = []; - message.entityTypes.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + 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; } default: @@ -108805,230 +111267,403 @@ }; /** - * Decodes a ListEntityTypesResponse 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.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog * @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) { + Changelog.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesResponse message. + * Verifies a Changelog message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @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) { + Changelog.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.v3beta1.EntityType.verify(message.entityTypes[i]); - if (error) - return "entityTypes." + error; - } + 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListEntityTypesResponse 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.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.Changelog} Changelog */ - ListEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) + Changelog.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Changelog) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityTypes[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Changelog.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListEntityTypesResponse 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.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} message ListEntityTypesResponse + * @param {google.cloud.dialogflow.cx.v3beta1.Changelog} message Changelog * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesResponse.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.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.v3beta1.EntityType.toObject(message.entityTypes[j], options); + if (options.defaults) { + object.name = ""; + object.userEmail = ""; + object.resource = ""; + object.createTime = null; + object.displayName = ""; + object.type = ""; + object.action = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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; return object; }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this Changelog to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @instance * @returns {Object.} JSON object */ - ListEntityTypesResponse.prototype.toJSON = function toJSON() { + Changelog.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 Changelog * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.Changelog * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntityTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Changelog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Changelog"; }; - return ListEntityTypesResponse; + return Changelog; })(); - v3beta1.GetEntityTypeRequest = (function() { - - /** - * Properties of a GetEntityTypeRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetEntityTypeRequest - * @property {string|null} [name] GetEntityTypeRequest name - * @property {string|null} [languageCode] GetEntityTypeRequest languageCode - */ + v3beta1.Deployments = (function() { /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new Deployments service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetEntityTypeRequest. - * @implements IGetEntityTypeRequest + * @classdesc Represents a Deployments + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [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 GetEntityTypeRequest(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); } - /** - * GetEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest - * @instance - */ - GetEntityTypeRequest.prototype.name = ""; - - /** - * GetEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest - * @instance - */ - GetEntityTypeRequest.prototype.languageCode = ""; + (Deployments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Deployments; /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates new Deployments service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest 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. */ - GetEntityTypeRequest.create = function create(properties) { - return new GetEntityTypeRequest(properties); + Deployments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Deployments|listDeployments}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @typedef ListDeploymentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} [response] ListDeploymentsResponse + */ + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListDeploymentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse, request, callback); + }, "name", { value: "ListDeployments" }); + + /** + * Calls ListDeployments. + * @function listDeployments + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} request ListDeploymentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Deployments|getDeployment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @typedef GetDeploymentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment} [response] Deployment + */ + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetDeploymentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Deployment, request, callback); + }, "name", { value: "GetDeployment" }); + + /** + * Calls GetDeployment. + * @function getDeployment + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} request GetDeploymentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Deployments; + })(); + + v3beta1.Deployment = (function() { + + /** + * Properties of a Deployment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeployment + * @property {string|null} [name] Deployment name + * @property {string|null} [flowVersion] Deployment flowVersion + * @property {google.cloud.dialogflow.cx.v3beta1.Deployment.State|null} [state] Deployment state + * @property {google.cloud.dialogflow.cx.v3beta1.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 Deployment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a Deployment. + * @implements IDeployment + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment=} [properties] Properties to set + */ + function Deployment(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]]; + } + + /** + * Deployment name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.name = ""; + + /** + * Deployment flowVersion. + * @member {string} flowVersion + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.flowVersion = ""; + + /** + * Deployment state. + * @member {google.cloud.dialogflow.cx.v3beta1.Deployment.State} state + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.state = 0; + + /** + * Deployment result. + * @member {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.result = null; + + /** + * Deployment startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.startTime = null; + + /** + * Deployment endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @instance + */ + Deployment.prototype.endTime = null; + + /** + * Creates a new Deployment instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment instance + */ + Deployment.create = function create(properties) { + return new Deployment(properties); + }; + + /** + * Encodes the specified Deployment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encode = function encode(message, writer) { + Deployment.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.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.v3beta1.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 GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified Deployment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployment} message Deployment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + Deployment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes a Deployment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment * @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) { + Deployment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -109037,7 +111672,23 @@ break; } case 2: { - message.languageCode = reader.string(); + message.flowVersion = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.result = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.decode(reader, reader.uint32()); + break; + } + case 5: { + 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: @@ -109049,133 +111700,470 @@ }; /** - * Decodes a GetEntityTypeRequest 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.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment * @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) { + Deployment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntityTypeRequest message. + * Verifies a Deployment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @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) { + Deployment.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.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 "state: 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.v3beta1.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 a GetEntityTypeRequest 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.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment} Deployment */ - GetEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest) + Deployment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Deployment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment(); if (object.name != null) message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.flowVersion != null) + message.flowVersion = String(object.flowVersion); + 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 "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Deployment.result: object expected"); + message.result = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.fromObject(object.result); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Deployment.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } return message; }; /** - * Creates a plain object from a GetEntityTypeRequest 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.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} message GetEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment} message Deployment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityTypeRequest.toObject = function toObject(message, options) { + Deployment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.languageCode = ""; + object.flowVersion = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.result = null; + object.startTime = null; + object.endTime = 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.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.v3beta1.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.Deployment.State[message.state] : message.state; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.dialogflow.cx.v3beta1.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 GetEntityTypeRequest to JSON. + * Converts this Deployment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @instance * @returns {Object.} JSON object */ - GetEntityTypeRequest.prototype.toJSON = function toJSON() { + Deployment.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 Deployment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Deployment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Deployment"; }; - return GetEntityTypeRequest; + /** + * State enum. + * @name google.cloud.dialogflow.cx.v3beta1.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() { + + /** + * Properties of a Result. + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @interface IResult + * @property {Array.|null} [deploymentTestResults] Result deploymentTestResults + * @property {string|null} [experiment] Result experiment + */ + + /** + * Constructs a new Result. + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.deploymentTestResults = []; + if (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 deploymentTestResults. + * @member {Array.} deploymentTestResults + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @instance + */ + Result.prototype.deploymentTestResults = $util.emptyArray; + + /** + * Result experiment. + * @member {string} experiment + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @instance + */ + Result.prototype.experiment = ""; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.IResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.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.v3beta1.Deployment.Result.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.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.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 Result message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Deployment.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.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.v3beta1.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.v3beta1.Deployment.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.deploymentTestResults && message.deploymentTestResults.length)) + message.deploymentTestResults = []; + message.deploymentTestResults.push(reader.string()); + break; + } + case 2: { + message.experiment = reader.string(); + 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.v3beta1.Deployment.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.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.v3beta1.Deployment.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.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 Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Deployment.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result(); + if (object.deploymentTestResults) { + if (!Array.isArray(object.deploymentTestResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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 Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.Result + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Deployment.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.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 Result to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Deployment.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.v3beta1.Deployment.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.v3beta1.Deployment.Result"; + }; + + return Result; + })(); + + return Deployment; })(); - v3beta1.CreateEntityTypeRequest = (function() { + v3beta1.ListDeploymentsRequest = (function() { /** - * Properties of a CreateEntityTypeRequest. + * Properties of a ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateEntityTypeRequest - * @property {string|null} [parent] CreateEntityTypeRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType - * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode + * @interface IListDeploymentsRequest + * @property {string|null} [parent] ListDeploymentsRequest parent + * @property {number|null} [pageSize] ListDeploymentsRequest pageSize + * @property {string|null} [pageToken] ListDeploymentsRequest pageToken */ /** - * Constructs a new CreateEntityTypeRequest. + * Constructs a new ListDeploymentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateEntityTypeRequest. - * @implements ICreateEntityTypeRequest + * @classdesc Represents a ListDeploymentsRequest. + * @implements IListDeploymentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest=} [properties] Properties to set */ - function CreateEntityTypeRequest(properties) { + function ListDeploymentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109183,90 +112171,90 @@ } /** - * CreateEntityTypeRequest parent. + * ListDeploymentsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @instance */ - CreateEntityTypeRequest.prototype.parent = ""; + ListDeploymentsRequest.prototype.parent = ""; /** - * CreateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * ListDeploymentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @instance */ - CreateEntityTypeRequest.prototype.entityType = null; + ListDeploymentsRequest.prototype.pageSize = 0; /** - * CreateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * ListDeploymentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @instance */ - CreateEntityTypeRequest.prototype.languageCode = ""; + ListDeploymentsRequest.prototype.pageToken = ""; /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * Creates a new ListDeploymentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest instance */ - CreateEntityTypeRequest.create = function create(properties) { - return new CreateEntityTypeRequest(properties); + ListDeploymentsRequest.create = function create(properties) { + return new ListDeploymentsRequest(properties); }; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3beta1.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.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 CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsRequest} message ListDeploymentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest * @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) { + ListDeploymentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -109275,11 +112263,11 @@ break; } case 2: { - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.languageCode = reader.string(); + message.pageToken = reader.string(); break; } default: @@ -109291,146 +112279,141 @@ }; /** - * Decodes a CreateEntityTypeRequest 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.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest * @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) { + ListDeploymentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies a ListDeploymentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @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) { + 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.entityType != null && message.hasOwnProperty("entityType")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.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.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 CreateEntityTypeRequest 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.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} ListDeploymentsRequest */ - CreateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest) + ListDeploymentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityType); - } - 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 CreateEntityTypeRequest 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.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} message CreateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest} message ListDeploymentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntityTypeRequest.toObject = function toObject(message, options) { + ListDeploymentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.entityType = null; - object.languageCode = ""; + object.pageSize = 0; + object.pageToken = ""; } 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.v3beta1.EntityType.toObject(message.entityType, options); - 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 CreateEntityTypeRequest to JSON. + * Converts this ListDeploymentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @instance * @returns {Object.} JSON object */ - CreateEntityTypeRequest.prototype.toJSON = function toJSON() { + ListDeploymentsRequest.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 ListDeploymentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest"; }; - return CreateEntityTypeRequest; + return ListDeploymentsRequest; })(); - v3beta1.UpdateEntityTypeRequest = (function() { + v3beta1.ListDeploymentsResponse = (function() { /** - * Properties of an UpdateEntityTypeRequest. + * Properties of a ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateEntityTypeRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType - * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask + * @interface IListDeploymentsResponse + * @property {Array.|null} [deployments] ListDeploymentsResponse deployments + * @property {string|null} [nextPageToken] ListDeploymentsResponse nextPageToken */ /** - * Constructs a new UpdateEntityTypeRequest. + * Constructs a new ListDeploymentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateEntityTypeRequest. - * @implements IUpdateEntityTypeRequest + * @classdesc Represents a ListDeploymentsResponse. + * @implements IListDeploymentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsResponse=} [properties] Properties to set */ - function UpdateEntityTypeRequest(properties) { + function ListDeploymentsResponse(properties) { + this.deployments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109438,103 +112421,92 @@ } /** - * UpdateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest - * @instance - */ - UpdateEntityTypeRequest.prototype.entityType = null; - - /** - * UpdateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * ListDeploymentsResponse deployments. + * @member {Array.} deployments + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @instance */ - UpdateEntityTypeRequest.prototype.languageCode = ""; + ListDeploymentsResponse.prototype.deployments = $util.emptyArray; /** - * UpdateEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * ListDeploymentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @instance */ - UpdateEntityTypeRequest.prototype.updateMask = null; + ListDeploymentsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new ListDeploymentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse instance */ - UpdateEntityTypeRequest.create = function create(properties) { - return new UpdateEntityTypeRequest(properties); + ListDeploymentsResponse.create = function create(properties) { + return new ListDeploymentsResponse(properties); }; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encode = function encode(message, writer) { + ListDeploymentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.cx.v3beta1.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(); + if (message.deployments != null && message.deployments.length) + for (var i = 0; i < message.deployments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListDeploymentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListDeploymentsResponse} message ListDeploymentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeploymentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes a ListDeploymentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse * @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) { + ListDeploymentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); + if (!(message.deployments && message.deployments.length)) + message.deployments = []; + message.deployments.push($root.google.cloud.dialogflow.cx.v3beta1.Deployment.decode(reader, reader.uint32())); break; } case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -109546,150 +112518,148 @@ }; /** - * Decodes an UpdateEntityTypeRequest 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.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse * @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) { + ListDeploymentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies a ListDeploymentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @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) { + ListDeploymentsResponse.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.v3beta1.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; + 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.v3beta1.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; }; /** - * Creates an UpdateEntityTypeRequest 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.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} ListDeploymentsResponse */ - UpdateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest) + ListDeploymentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse(); + if (object.deployments) { + if (!Array.isArray(object.deployments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListDeploymentsResponse.deployments: object expected"); + message.deployments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.fromObject(object.deployments[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateEntityTypeRequest 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.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} message UpdateEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse} message ListDeploymentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntityTypeRequest.toObject = function toObject(message, options) { + ListDeploymentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.entityType = null; - object.languageCode = ""; - object.updateMask = null; + 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.v3beta1.Deployment.toObject(message.deployments[j], options); } - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this ListDeploymentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @instance * @returns {Object.} JSON object */ - UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { + ListDeploymentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEntityTypeRequest + * Gets the default type url for ListDeploymentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDeploymentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse"; }; - return UpdateEntityTypeRequest; + return ListDeploymentsResponse; })(); - v3beta1.DeleteEntityTypeRequest = (function() { + v3beta1.GetDeploymentRequest = (function() { /** - * Properties of a DeleteEntityTypeRequest. + * Properties of a GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteEntityTypeRequest - * @property {string|null} [name] DeleteEntityTypeRequest name - * @property {boolean|null} [force] DeleteEntityTypeRequest force + * @interface IGetDeploymentRequest + * @property {string|null} [name] GetDeploymentRequest name */ /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new GetDeploymentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteEntityTypeRequest. - * @implements IDeleteEntityTypeRequest + * @classdesc Represents a GetDeploymentRequest. + * @implements IGetDeploymentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest=} [properties] Properties to set */ - function DeleteEntityTypeRequest(properties) { + function GetDeploymentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109697,80 +112667,70 @@ } /** - * DeleteEntityTypeRequest name. + * GetDeploymentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest - * @instance - */ - DeleteEntityTypeRequest.prototype.name = ""; - - /** - * DeleteEntityTypeRequest force. - * @member {boolean} force - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @instance */ - DeleteEntityTypeRequest.prototype.force = false; + GetDeploymentRequest.prototype.name = ""; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Creates a new GetDeploymentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest instance */ - DeleteEntityTypeRequest.create = function create(properties) { - return new DeleteEntityTypeRequest(properties); + GetDeploymentRequest.create = function create(properties) { + return new GetDeploymentRequest(properties); }; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetDeploymentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetDeploymentRequest} message GetDeploymentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDeploymentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes a GetDeploymentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest * @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) { + GetDeploymentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -109778,10 +112738,6 @@ message.name = reader.string(); break; } - case 2: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -109791,470 +112747,331 @@ }; /** - * Decodes a DeleteEntityTypeRequest 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.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest * @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) { + GetDeploymentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies a GetDeploymentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @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) { + 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.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a DeleteEntityTypeRequest 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.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} GetDeploymentRequest */ - DeleteEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest) + GetDeploymentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest(); 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 DeleteEntityTypeRequest 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.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} message DeleteEntityTypeRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest} message GetDeploymentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntityTypeRequest.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.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 DeleteEntityTypeRequest to JSON. + * Converts this GetDeploymentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @instance * @returns {Object.} JSON object */ - DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { + GetDeploymentRequest.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 GetDeploymentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEntityTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDeploymentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest"; }; - return DeleteEntityTypeRequest; + return GetDeploymentRequest; })(); - v3beta1.Environments = (function() { + v3beta1.EntityTypes = (function() { /** - * Constructs a new Environments service. + * Constructs a new EntityTypes service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Environments + * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { + function EntityTypes(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; + (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; /** - * Creates new Environments service using the specified rpc implementation. + * Creates new EntityTypes service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @memberof google.cloud.dialogflow.cx.v3beta1.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 {Environments} RPC service. Useful where requests and/or responses are streamed. + * @returns {EntityTypes} RPC service. Useful where requests and/or responses are streamed. */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + EntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|listEnvironments}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|getEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef GetEnvironmentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|getEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef GetEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.Environment} [response] Environment + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType */ /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); + Object.defineProperty(EntityTypes.prototype.getEntityType = function getEntityType(request, callback) { + return this.rpcCall(getEntityType, $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "GetEntityType" }); /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|createEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef CreateEnvironmentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|createEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef CreateEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType */ /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); + Object.defineProperty(EntityTypes.prototype.createEntityType = function createEntityType(request, callback) { + return this.rpcCall(createEntityType, $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "CreateEntityType" }); /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|updateEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef UpdateEnvironmentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|updateEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef UpdateEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} [response] EntityType */ /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType * @returns {undefined} * @variation 1 */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); + Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { + return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.cx.v3beta1.EntityType, request, callback); + }, "name", { value: "UpdateEntityType" }); /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|deleteEnvironment}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef DeleteEnvironmentCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|deleteEntityType}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef DeleteEntityTypeCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityTypeCallback} 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.v3beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEnvironment" }); + Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { + return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntityType" }); /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|lookupEnvironmentHistory}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef LookupEnvironmentHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse - */ - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, request, callback); - }, "name", { value: "LookupEnvironmentHistory" }); - - /** - * Calls LookupEnvironmentHistory. - * @function lookupEnvironmentHistory - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|runContinuousTest}. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunContinuousTest" }); - - /** - * Calls RunContinuousTest. - * @function runContinuousTest - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|listContinuousTestResults}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef ListContinuousTestResultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse - */ - - /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { - return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse, request, callback); - }, "name", { value: "ListContinuousTestResults" }); - - /** - * Calls ListContinuousTestResults. - * @function listContinuousTestResults - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|deployFlow}. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments - * @typedef DeployFlowCallback + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.EntityTypes|listEntityTypes}. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes + * @typedef ListEntityTypesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @param {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse */ /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypesCallback} callback Node-style callback called with the error, if any, and ListEntityTypesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { - return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeployFlow" }); + Object.defineProperty(EntityTypes.prototype.listEntityTypes = function listEntityTypes(request, callback) { + return this.rpcCall(listEntityTypes, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse, request, callback); + }, "name", { value: "ListEntityTypes" }); /** - * Calls DeployFlow. - * @function deployFlow - * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityTypes * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} request DeployFlowRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return Environments; + return EntityTypes; })(); - v3beta1.Environment = (function() { + v3beta1.EntityType = (function() { /** - * Properties of an Environment. + * Properties of an EntityType. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig - * @property {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig + * @interface IEntityType + * @property {string|null} [name] EntityType name + * @property {string|null} [displayName] EntityType displayName + * @property {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind|null} [kind] EntityType kind + * @property {google.cloud.dialogflow.cx.v3beta1.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 Environment. + * Constructs a new EntityType. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an Environment. - * @implements IEnvironment + * @classdesc Represents an EntityType. + * @implements IEntityType * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set */ - function Environment(properties) { - this.versionConfigs = []; + 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) @@ -110262,131 +113079,142 @@ } /** - * Environment name. + * EntityType name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.name = ""; + EntityType.prototype.name = ""; /** - * Environment displayName. + * EntityType displayName. * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.displayName = ""; + EntityType.prototype.displayName = ""; /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * EntityType kind. + * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.Kind} kind + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.description = ""; + EntityType.prototype.kind = 0; /** - * Environment versionConfigs. - * @member {Array.} versionConfigs - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * EntityType autoExpansionMode. + * @member {google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode} autoExpansionMode + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.versionConfigs = $util.emptyArray; + EntityType.prototype.autoExpansionMode = 0; /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * EntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.updateTime = null; + EntityType.prototype.entities = $util.emptyArray; /** - * Environment testCasesConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.Environment.ITestCasesConfig|null|undefined} testCasesConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * EntityType excludedPhrases. + * @member {Array.} excludedPhrases + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.testCasesConfig = null; + EntityType.prototype.excludedPhrases = $util.emptyArray; /** - * Environment webhookConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig|null|undefined} webhookConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * EntityType enableFuzzyExtraction. + * @member {boolean} enableFuzzyExtraction + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance */ - Environment.prototype.webhookConfig = null; + EntityType.prototype.enableFuzzyExtraction = false; /** - * Creates a new Environment instance using the specified properties. + * EntityType redact. + * @member {boolean} redact + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @instance + */ + EntityType.prototype.redact = false; + + /** + * Creates a new EntityType instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType instance */ - Environment.create = function create(properties) { - return new Environment(properties); + EntityType.create = function create(properties) { + return new EntityType(properties); }; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encode = function encode(message, writer) { + EntityType.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.v3beta1.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.v3beta1.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.v3beta1.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + 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.v3beta1.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.v3beta1.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 Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEntityType} message EntityType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { + EntityType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes an EntityType message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType * @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) { + EntityType.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -110399,25 +113227,31 @@ break; } case 3: { - message.description = reader.string(); + message.kind = reader.int32(); break; } - case 6: { - if (!(message.versionConfigs && message.versionConfigs.length)) - message.versionConfigs = []; - message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.decode(reader, reader.uint32())); + case 4: { + message.autoExpansionMode = reader.int32(); break; } case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.ExcludedPhrase.decode(reader, reader.uint32())); break; } case 7: { - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.decode(reader, reader.uint32()); + message.enableFuzzyExtraction = reader.bool(); break; } - case 10: { - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.decode(reader, reader.uint32()); + case 9: { + message.redact = reader.bool(); break; } default: @@ -110429,30 +113263,30 @@ }; /** - * Decodes an Environment 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.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType * @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) { + EntityType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Environment message. + * Verifies an EntityType message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @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) { + EntityType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -110461,169 +113295,262 @@ 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.v3beta1.Environment.VersionConfig.verify(message.versionConfigs[i]); + 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.v3beta1.EntityType.Entity.verify(message.entities[i]); if (error) - return "versionConfigs." + error; + return "entities." + 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.v3beta1.Environment.TestCasesConfig.verify(message.testCasesConfig); - if (error) - return "testCasesConfig." + error; - } - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.verify(message.webhookConfig); - if (error) - return "webhookConfig." + 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.v3beta1.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 an Environment 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.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType} EntityType */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment) + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType(); 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.v3beta1.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.v3beta1.Environment.versionConfigs: object expected"); - message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + 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.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + 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.testCasesConfig != null) { - if (typeof object.testCasesConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.testCasesConfig: object expected"); - message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.fromObject(object.testCasesConfig); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.fromObject(object.entities[i]); + } } - if (object.webhookConfig != null) { - if (typeof object.webhookConfig !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.webhookConfig: object expected"); - message.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.fromObject(object.webhookConfig); + if (object.excludedPhrases) { + if (!Array.isArray(object.excludedPhrases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.excludedPhrases: object expected"); + message.excludedPhrases[i] = $root.google.cloud.dialogflow.cx.v3beta1.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 an Environment 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.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment} message Environment + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType} message EntityType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Environment.toObject = function toObject(message, options) { + EntityType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.versionConfigs = []; + if (options.arrays || options.defaults) { + object.entities = []; + object.excludedPhrases = []; + } if (options.defaults) { object.name = ""; object.displayName = ""; - object.description = ""; - object.updateTime = null; - object.testCasesConfig = null; - object.webhookConfig = null; + 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.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.v3beta1.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.EntityType.Entity.toObject(message.entities[j], options); } - if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) - object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); - if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) - object.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.toObject(message.webhookConfig, 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.v3beta1.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 Environment to JSON. + * Converts this EntityType to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @instance * @returns {Object.} JSON object */ - Environment.prototype.toJSON = function toJSON() { + EntityType.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 EntityType * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EntityType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Environment"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EntityType"; }; - Environment.VersionConfig = (function() { + /** + * Kind enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; + })(); + + /** + * AutoExpansionMode enum. + * @name google.cloud.dialogflow.cx.v3beta1.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 + */ + 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() { /** - * Properties of a VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @interface IVersionConfig - * @property {string|null} [version] VersionConfig version + * Properties of an Entity. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @interface IEntity + * @property {string|null} [value] Entity value + * @property {Array.|null} [synonyms] Entity synonyms */ /** - * Constructs a new VersionConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @classdesc Represents a VersionConfig. - * @implements IVersionConfig + * Constructs a new Entity. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @classdesc Represents an Entity. + * @implements IEntity * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set */ - function VersionConfig(properties) { + function Entity(properties) { + this.synonyms = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110631,75 +113558,92 @@ } /** - * VersionConfig version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * Entity value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @instance */ - VersionConfig.prototype.version = ""; + Entity.prototype.value = ""; /** - * Creates a new VersionConfig instance using the specified properties. + * Entity synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + * @instance + */ + Entity.prototype.synonyms = $util.emptyArray; + + /** + * Creates a new Entity instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity instance */ - VersionConfig.create = function create(properties) { - return new VersionConfig(properties); + Entity.create = function create(properties) { + return new Entity(properties); }; /** - * Encodes the specified VersionConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionConfig.encode = function encode(message, writer) { + Entity.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.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 VersionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.verify|verify} messages. + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.Entity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig} message VersionConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + Entity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VersionConfig message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity * @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) { + Entity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.value = reader.string(); + break; + } + case 2: { + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); break; } default: @@ -110711,390 +113655,143 @@ }; /** - * Decodes a VersionConfig message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity * @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) { + Entity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VersionConfig message. + * Verifies an Entity message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @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) { + Entity.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.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 a VersionConfig 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. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} Entity */ - VersionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Environment.VersionConfig"; - }; - - return VersionConfig; - })(); - - Environment.TestCasesConfig = (function() { - - /** - * Properties of a TestCasesConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment - * @classdesc Represents a TestCasesConfig. - * @implements ITestCasesConfig - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } - - /** - * TestCasesConfig testCases. - * @member {Array.} testCases - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @instance - */ - TestCasesConfig.prototype.testCases = $util.emptyArray; - - /** - * TestCasesConfig enableContinuousRun. - * @member {boolean} enableContinuousRun - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @instance - */ - TestCasesConfig.prototype.enableContinuousRun = false; - - /** - * TestCasesConfig enablePredeploymentRun. - * @member {boolean} enablePredeploymentRun - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @instance - */ - TestCasesConfig.prototype.enablePredeploymentRun = false; - - /** - * Creates a new TestCasesConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.ITestCasesConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.Environment.TestCasesConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Environment.TestCasesConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig} TestCasesConfig - */ - TestCasesConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Entity) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(); - if (object.testCases) { - if (!Array.isArray(object.testCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.Entity.synonyms: array expected"); + message.synonyms = []; + for (var i = 0; i < object.synonyms.length; ++i) + message.synonyms[i] = String(object.synonyms[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 an Entity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig} message TestCasesConfig + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.Entity} message Entity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCasesConfig.toObject = function toObject(message, options) { + Entity.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]; + 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]; } - 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 Entity to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @instance * @returns {Object.} JSON object */ - TestCasesConfig.prototype.toJSON = function toJSON() { + Entity.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 Entity * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.Entity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCasesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EntityType.Entity"; }; - return TestCasesConfig; + return Entity; })(); - Environment.WebhookConfig = (function() { + EntityType.ExcludedPhrase = (function() { /** - * Properties of a WebhookConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @interface IWebhookConfig - * @property {Array.|null} [webhookOverrides] WebhookConfig webhookOverrides + * Properties of an ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @interface IExcludedPhrase + * @property {string|null} [value] ExcludedPhrase value */ /** - * Constructs a new WebhookConfig. - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment - * @classdesc Represents a WebhookConfig. - * @implements IWebhookConfig + * Constructs a new ExcludedPhrase. + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType + * @classdesc Represents an ExcludedPhrase. + * @implements IExcludedPhrase * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set */ - function WebhookConfig(properties) { - this.webhookOverrides = []; + function ExcludedPhrase(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111102,78 +113799,75 @@ } /** - * WebhookConfig webhookOverrides. - * @member {Array.} webhookOverrides - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * ExcludedPhrase value. + * @member {string} value + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @instance */ - WebhookConfig.prototype.webhookOverrides = $util.emptyArray; + ExcludedPhrase.prototype.value = ""; /** - * Creates a new WebhookConfig instance using the specified properties. + * Creates a new ExcludedPhrase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig} WebhookConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase instance */ - WebhookConfig.create = function create(properties) { - return new WebhookConfig(properties); + ExcludedPhrase.create = function create(properties) { + return new ExcludedPhrase(properties); }; /** - * Encodes the specified WebhookConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.verify|verify} messages. + * Encodes the specified ExcludedPhrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookConfig.encode = function encode(message, writer) { + ExcludedPhrase.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.v3beta1.Webhook.encode(message.webhookOverrides[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified WebhookConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.verify|verify} messages. + * Encodes the specified ExcludedPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.IExcludedPhrase} message ExcludedPhrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WebhookConfig.encodeDelimited = function encodeDelimited(message, writer) { + ExcludedPhrase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WebhookConfig message from the specified reader or buffer. + * Decodes an ExcludedPhrase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig} WebhookConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase * @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) { + ExcludedPhrase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.webhookOverrides && message.webhookOverrides.length)) - message.webhookOverrides = []; - message.webhookOverrides.push($root.google.cloud.dialogflow.cx.v3beta1.Webhook.decode(reader, reader.uint32())); + message.value = reader.string(); break; } default: @@ -111185,144 +113879,128 @@ }; /** - * Decodes a WebhookConfig message from the specified reader or buffer, length delimited. + * Decodes an ExcludedPhrase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig} WebhookConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase * @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) { + ExcludedPhrase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WebhookConfig message. + * Verifies an ExcludedPhrase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @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) { + ExcludedPhrase.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.v3beta1.Webhook.verify(message.webhookOverrides[i]); - if (error) - return "webhookOverrides." + error; - } - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a WebhookConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExcludedPhrase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig} WebhookConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} ExcludedPhrase */ - WebhookConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig) + ExcludedPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig(); - if (object.webhookOverrides) { - if (!Array.isArray(object.webhookOverrides)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig.webhookOverrides: object expected"); - message.webhookOverrides[i] = $root.google.cloud.dialogflow.cx.v3beta1.Webhook.fromObject(object.webhookOverrides[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a WebhookConfig message. Also converts values to other types if specified. + * Creates a plain object from an ExcludedPhrase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig} message WebhookConfig + * @param {google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase} message ExcludedPhrase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WebhookConfig.toObject = function toObject(message, options) { + ExcludedPhrase.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.v3beta1.Webhook.toObject(message.webhookOverrides[j], options); - } + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this WebhookConfig to JSON. + * Converts this ExcludedPhrase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @instance * @returns {Object.} JSON object */ - WebhookConfig.prototype.toJSON = function toJSON() { + ExcludedPhrase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WebhookConfig + * Gets the default type url for ExcludedPhrase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WebhookConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExcludedPhrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase"; }; - return WebhookConfig; + return ExcludedPhrase; })(); - return Environment; + return EntityType; })(); - v3beta1.ListEnvironmentsRequest = (function() { + v3beta1.ListEntityTypesRequest = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Properties of a ListEntityTypesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest + * @classdesc Represents a ListEntityTypesRequest. + * @implements IListEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -111330,90 +114008,100 @@ } /** - * ListEnvironmentsRequest parent. + * ListEntityTypesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @instance */ - ListEnvironmentsRequest.prototype.parent = ""; + ListEntityTypesRequest.prototype.parent = ""; /** - * ListEnvironmentsRequest pageSize. + * ListEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.languageCode = ""; + + /** + * ListEntityTypesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @instance */ - ListEnvironmentsRequest.prototype.pageSize = 0; + ListEntityTypesRequest.prototype.pageSize = 0; /** - * ListEnvironmentsRequest pageToken. + * ListEntityTypesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + ListEntityTypesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -111422,10 +114110,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; } @@ -111438,35 +114130,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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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"; @@ -111477,19 +114172,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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest} ListEntityTypesRequest */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest) + ListEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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) @@ -111498,25 +114195,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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.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")) @@ -111525,54 +114225,54 @@ }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest"; }; - return ListEnvironmentsRequest; + return ListEntityTypesRequest; })(); - v3beta1.ListEnvironmentsResponse = (function() { + v3beta1.ListEntityTypesResponse = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of a ListEntityTypesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents a ListEntityTypesResponse. + * @implements IListEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -111580,88 +114280,88 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * ListEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @instance */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * ListEnvironmentsResponse nextPageToken. + * ListEntityTypesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + ListEntityTypesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32())); break; } case 2: { @@ -111677,39 +114377,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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.verify(message.entityTypes[i]); if (error) - return "environments." + error; + return "entityTypes." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -111719,25 +114419,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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse} ListEntityTypesResponse */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) + ListEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.fromObject(object.entityTypes[i]); } } if (object.nextPageToken != null) @@ -111746,26 +114446,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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EntityType.toObject(message.entityTypes[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -111773,52 +114473,53 @@ }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this ListEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse"; }; - return ListEnvironmentsResponse; + return ListEntityTypesResponse; })(); - v3beta1.GetEnvironmentRequest = (function() { + v3beta1.GetEntityTypeRequest = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of a GetEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents a GetEntityTypeRequest. + * @implements IGetEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -111826,70 +114527,80 @@ } /** - * GetEnvironmentRequest name. + * GetEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEntityTypeRequest + * @instance + */ + GetEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new GetEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + GetEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -111897,6 +114608,10 @@ message.name = reader.string(); break; } + case 2: { + message.languageCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -111906,123 +114621,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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest} GetEntityTypeRequest */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest) + GetEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest"; }; - return GetEnvironmentRequest; + return GetEntityTypeRequest; })(); - v3beta1.CreateEnvironmentRequest = (function() { + v3beta1.CreateEntityTypeRequest = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of a CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @interface ICreateEntityTypeRequest + * @property {string|null} [parent] CreateEntityTypeRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType + * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents a CreateEntityTypeRequest. + * @implements ICreateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -112030,80 +114755,90 @@ } /** - * CreateEnvironmentRequest parent. + * CreateEntityTypeRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @instance */ - CreateEnvironmentRequest.prototype.parent = ""; + CreateEntityTypeRequest.prototype.parent = ""; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * CreateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEntityTypeRequest + * @instance + */ + CreateEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + CreateEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -112112,7 +114847,11 @@ break; } case 2: { - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.EntityType.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } default: @@ -112124,137 +114863,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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.verify(message.environment); + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest} CreateEntityTypeRequest */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest) + CreateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.toObject(message.environment, options); + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest"; }; - return CreateEnvironmentRequest; + return CreateEntityTypeRequest; })(); - v3beta1.UpdateEnvironmentRequest = (function() { + v3beta1.UpdateEntityTypeRequest = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of an UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateEnvironmentRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @interface IUpdateEntityTypeRequest + * @property {google.cloud.dialogflow.cx.v3beta1.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.v3beta1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents an UpdateEntityTypeRequest. + * @implements IUpdateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -112262,88 +115010,102 @@ } /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * UpdateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.cx.v3beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @instance */ - UpdateEnvironmentRequest.prototype.environment = null; + UpdateEntityTypeRequest.prototype.entityType = null; /** - * UpdateEnvironmentRequest updateMask. + * UpdateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + * @instance + */ + UpdateEntityTypeRequest.prototype.languageCode = ""; + + /** + * UpdateEntityTypeRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + UpdateEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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; } @@ -112356,37 +115118,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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.verify(message.environment); + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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) @@ -112396,101 +115161,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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest) + UpdateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest(); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.toObject(message.environment, options); + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest"; }; - return UpdateEnvironmentRequest; + return UpdateEntityTypeRequest; })(); - v3beta1.DeleteEnvironmentRequest = (function() { + v3beta1.DeleteEntityTypeRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a DeleteEntityTypeRequest. + * @implements IDeleteEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.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) @@ -112498,70 +115269,80 @@ } /** - * DeleteEnvironmentRequest name. + * DeleteEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEntityTypeRequest + * @instance + */ + DeleteEntityTypeRequest.prototype.force = false; + + /** + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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) { + DeleteEntityTypeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -112569,6 +115350,10 @@ message.name = reader.string(); break; } + case 2: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -112578,124 +115363,470 @@ }; /** - * 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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest) + DeleteEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest"; }; - return DeleteEnvironmentRequest; + return DeleteEntityTypeRequest; })(); - v3beta1.LookupEnvironmentHistoryRequest = (function() { + v3beta1.Environments = (function() { /** - * Properties of a LookupEnvironmentHistoryRequest. + * Constructs a new Environments service. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ILookupEnvironmentHistoryRequest - * @property {string|null} [name] LookupEnvironmentHistoryRequest name - * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize - * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken + * @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; /** - * Constructs a new LookupEnvironmentHistoryRequest. + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.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. + */ + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|listEnvironments}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|getEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.cx.v3beta1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|createEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|updateEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|deleteEnvironment}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|lookupEnvironmentHistory}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef LookupEnvironmentHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} [response] LookupEnvironmentHistoryResponse + */ + + /** + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryRequest, $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse, request, callback); + }, "name", { value: "LookupEnvironmentHistory" }); + + /** + * Calls LookupEnvironmentHistory. + * @function lookupEnvironmentHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} request LookupEnvironmentHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|runContinuousTest}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunContinuousTest" }); + + /** + * Calls RunContinuousTest. + * @function runContinuousTest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} request RunContinuousTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|listContinuousTestResults}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef ListContinuousTestResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} [response] ListContinuousTestResultsResponse + */ + + /** + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResultsCallback} callback Node-style callback called with the error, if any, and ListContinuousTestResultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listContinuousTestResults = function listContinuousTestResults(request, callback) { + return this.rpcCall(listContinuousTestResults, $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse, request, callback); + }, "name", { value: "ListContinuousTestResults" }); + + /** + * Calls ListContinuousTestResults. + * @function listContinuousTestResults + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} request ListContinuousTestResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Environments|deployFlow}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @typedef DeployFlowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlowCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deployFlow = function deployFlow(request, callback) { + return this.rpcCall(deployFlow, $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployFlow" }); + + /** + * Calls DeployFlow. + * @function deployFlow + * @memberof google.cloud.dialogflow.cx.v3beta1.Environments + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} request DeployFlowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v3beta1.Environment = (function() { + + /** + * Properties of an Environment. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a LookupEnvironmentHistoryRequest. - * @implements ILookupEnvironmentHistoryRequest + * @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.v3beta1.Environment.ITestCasesConfig|null} [testCasesConfig] Environment testCasesConfig + * @property {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig|null} [webhookConfig] Environment webhookConfig + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an Environment. + * @implements IEnvironment * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set */ - function LookupEnvironmentHistoryRequest(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) @@ -112703,90 +115834,131 @@ } /** - * LookupEnvironmentHistoryRequest name. + * Environment name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - LookupEnvironmentHistoryRequest.prototype.name = ""; + Environment.prototype.name = ""; /** - * LookupEnvironmentHistoryRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - LookupEnvironmentHistoryRequest.prototype.pageSize = 0; + Environment.prototype.displayName = ""; /** - * LookupEnvironmentHistoryRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * Environment description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance */ - LookupEnvironmentHistoryRequest.prototype.pageToken = ""; + Environment.prototype.description = ""; /** - * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. + * Environment versionConfigs. + * @member {Array.} versionConfigs + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @instance + */ + Environment.prototype.versionConfigs = $util.emptyArray; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment testCasesConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.Environment.ITestCasesConfig|null|undefined} testCasesConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @instance + */ + Environment.prototype.testCasesConfig = null; + + /** + * Environment webhookConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig|null|undefined} webhookConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @instance + */ + Environment.prototype.webhookConfig = null; + + /** + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment instance */ - LookupEnvironmentHistoryRequest.create = function create(properties) { - return new LookupEnvironmentHistoryRequest(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encode = function encode(message, writer) { + Environment.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.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.v3beta1.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.v3beta1.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.v3beta1.Environment.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment * @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) { + Environment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -112795,11 +115967,29 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.displayName = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.description = reader.string(); + break; + } + case 6: { + if (!(message.versionConfigs && message.versionConfigs.length)) + message.versionConfigs = []; + message.versionConfigs.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.decode(reader, reader.uint32()); break; } default: @@ -112811,141 +116001,900 @@ }; /** - * Decodes a LookupEnvironmentHistoryRequest 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.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment * @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) { + Environment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryRequest message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @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) { + Environment.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.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.v3beta1.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.v3beta1.Environment.TestCasesConfig.verify(message.testCasesConfig); + if (error) + return "testCasesConfig." + error; + } + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.verify(message.webhookConfig); + if (error) + return "webhookConfig." + error; + } return null; }; /** - * Creates a LookupEnvironmentHistoryRequest 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.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment} Environment */ - LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment(); 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); + 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.v3beta1.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.v3beta1.Environment.versionConfigs: object expected"); + message.versionConfigs[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig.fromObject(object.versionConfigs[i]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.testCasesConfig: object expected"); + message.testCasesConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.fromObject(object.testCasesConfig); + } + if (object.webhookConfig != null) { + if (typeof object.webhookConfig !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Environment.webhookConfig: object expected"); + message.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.fromObject(object.webhookConfig); + } return message; }; /** - * Creates a plain object from a LookupEnvironmentHistoryRequest 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.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest + * @param {google.cloud.dialogflow.cx.v3beta1.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.versionConfigs = []; if (options.defaults) { object.name = ""; - object.pageSize = 0; - object.pageToken = ""; + 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.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this LookupEnvironmentHistoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + 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.v3beta1.Environment.VersionConfig.toObject(message.versionConfigs[j], options); + } + if (message.testCasesConfig != null && message.hasOwnProperty("testCasesConfig")) + object.testCasesConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.toObject(message.testCasesConfig, options); + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) + object.webhookConfig = $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.toObject(message.webhookConfig, options); + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { + Environment.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 Environment * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LookupEnvironmentHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Environment"; }; - return LookupEnvironmentHistoryRequest; + Environment.VersionConfig = (function() { + + /** + * Properties of a VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @interface IVersionConfig + * @property {string|null} [version] VersionConfig version + */ + + /** + * Constructs a new VersionConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @classdesc Represents a VersionConfig. + * @implements IVersionConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig + * @instance + */ + VersionConfig.prototype.version = ""; + + /** + * Creates a new VersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IVersionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.Environment.VersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Environment.VersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig} VersionConfig + */ + VersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.VersionConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Environment.VersionConfig"; + }; + + return VersionConfig; + })(); + + Environment.TestCasesConfig = (function() { + + /** + * Properties of a TestCasesConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment + * @classdesc Represents a TestCasesConfig. + * @implements ITestCasesConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } + + /** + * TestCasesConfig testCases. + * @member {Array.} testCases + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.testCases = $util.emptyArray; + + /** + * TestCasesConfig enableContinuousRun. + * @member {boolean} enableContinuousRun + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.enableContinuousRun = false; + + /** + * TestCasesConfig enablePredeploymentRun. + * @member {boolean} enablePredeploymentRun + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @instance + */ + TestCasesConfig.prototype.enablePredeploymentRun = false; + + /** + * Creates a new TestCasesConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.ITestCasesConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.Environment.TestCasesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Environment.TestCasesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig} TestCasesConfig + */ + TestCasesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig(); + if (object.testCases) { + if (!Array.isArray(object.testCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.TestCasesConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Environment.TestCasesConfig"; + }; + + return TestCasesConfig; + })(); + + Environment.WebhookConfig = (function() { + + /** + * Properties of a WebhookConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @interface IWebhookConfig + * @property {Array.|null} [webhookOverrides] WebhookConfig webhookOverrides + */ + + /** + * Constructs a new WebhookConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment + * @classdesc Represents a WebhookConfig. + * @implements IWebhookConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig + * @instance + */ + WebhookConfig.prototype.webhookOverrides = $util.emptyArray; + + /** + * Creates a new WebhookConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Environment.IWebhookConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Environment.WebhookConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.webhookOverrides && message.webhookOverrides.length)) + message.webhookOverrides = []; + message.webhookOverrides.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Environment.WebhookConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig} WebhookConfig + */ + WebhookConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig(); + if (object.webhookOverrides) { + if (!Array.isArray(object.webhookOverrides)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig.webhookOverrides: object expected"); + message.webhookOverrides[i] = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.WebhookConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Webhook.toObject(message.webhookOverrides[j], options); + } + return object; + }; + + /** + * Converts this WebhookConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Environment.WebhookConfig"; + }; + + return WebhookConfig; + })(); + + return Environment; })(); - v3beta1.LookupEnvironmentHistoryResponse = (function() { + v3beta1.ListEnvironmentsRequest = (function() { /** - * Properties of a LookupEnvironmentHistoryResponse. + * Properties of a ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ILookupEnvironmentHistoryResponse - * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments - * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken */ /** - * Constructs a new LookupEnvironmentHistoryResponse. + * Constructs a new ListEnvironmentsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a LookupEnvironmentHistoryResponse. - * @implements ILookupEnvironmentHistoryResponse + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set */ - function LookupEnvironmentHistoryResponse(properties) { - this.environments = []; + function ListEnvironmentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -112953,92 +116902,103 @@ } /** - * LookupEnvironmentHistoryResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance */ - LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; + ListEnvironmentsRequest.prototype.parent = ""; /** - * LookupEnvironmentHistoryResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance */ - LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; + ListEnvironmentsRequest.prototype.pageSize = 0; /** - * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ - LookupEnvironmentHistoryResponse.create = function create(properties) { - return new LookupEnvironmentHistoryResponse(properties); + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); }; /** - * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encode = function encode(message, writer) { + ListEnvironmentsRequest.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.v3beta1.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.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 LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @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) { + ListEnvironmentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -113050,152 +117010,141 @@ }; /** - * Decodes a LookupEnvironmentHistoryResponse 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.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @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) { + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LookupEnvironmentHistoryResponse message. + * Verifies a ListEnvironmentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @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) { + ListEnvironmentsRequest.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.v3beta1.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.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 LookupEnvironmentHistoryResponse 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.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} ListEnvironmentsRequest */ - LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest(); + 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 LookupEnvironmentHistoryResponse 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.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { + ListEnvironmentsRequest.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.v3beta1.Environment.toObject(message.environments[j], options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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 LookupEnvironmentHistoryResponse to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @instance * @returns {Object.} JSON object */ - LookupEnvironmentHistoryResponse.prototype.toJSON = function toJSON() { + ListEnvironmentsRequest.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 ListEnvironmentsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LookupEnvironmentHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest"; }; - return LookupEnvironmentHistoryResponse; + return ListEnvironmentsRequest; })(); - v3beta1.ContinuousTestResult = (function() { + v3beta1.ListEnvironmentsResponse = (function() { /** - * Properties of a ContinuousTestResult. + * Properties of a ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IContinuousTestResult - * @property {string|null} [name] ContinuousTestResult name - * @property {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult|null} [result] ContinuousTestResult result - * @property {Array.|null} [testCaseResults] ContinuousTestResult testCaseResults - * @property {google.protobuf.ITimestamp|null} [runTime] ContinuousTestResult runTime + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken */ /** - * Constructs a new ContinuousTestResult. + * Constructs a new ListEnvironmentsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ContinuousTestResult. - * @implements IContinuousTestResult + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set */ - function ContinuousTestResult(properties) { - this.testCaseResults = []; + function ListEnvironmentsResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113203,120 +117152,92 @@ } /** - * ContinuousTestResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult - * @instance - */ - ContinuousTestResult.prototype.name = ""; - - /** - * ContinuousTestResult result. - * @member {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult} result - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult - * @instance - */ - ContinuousTestResult.prototype.result = 0; - - /** - * ContinuousTestResult testCaseResults. - * @member {Array.} testCaseResults - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance */ - ContinuousTestResult.prototype.testCaseResults = $util.emptyArray; + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; /** - * ContinuousTestResult runTime. - * @member {google.protobuf.ITimestamp|null|undefined} runTime - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance */ - ContinuousTestResult.prototype.runTime = null; + ListEnvironmentsResponse.prototype.nextPageToken = ""; /** - * Creates a new ContinuousTestResult instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance */ - ContinuousTestResult.create = function create(properties) { - return new ContinuousTestResult(properties); + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); }; /** - * Encodes the specified ContinuousTestResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult} message ContinuousTestResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContinuousTestResult.encode = function encode(message, writer) { + ListEnvironmentsResponse.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(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 ContinuousTestResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.verify|verify} messages. + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult} message ContinuousTestResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContinuousTestResult.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContinuousTestResult message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ContinuousTestResult} ContinuousTestResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContinuousTestResult.decode = function decode(reader, length) { + ListEnvironmentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); 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.v3beta1.Environment.decode(reader, reader.uint32())); 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()); + message.nextPageToken = reader.string(); break; } default: @@ -113328,205 +117249,148 @@ }; /** - * Decodes a ContinuousTestResult 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.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContinuousTestResult.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 ContinuousTestResult message. + * Verifies a ListEnvironmentsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContinuousTestResult.verify = function verify(message) { + ListEnvironmentsResponse.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.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.v3beta1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; } - 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ContinuousTestResult 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.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} ListEnvironmentsResponse */ - ContinuousTestResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult(); - if (object.name != null) - message.name = String(object.name); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); } - 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.v3beta1.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.v3beta1.ContinuousTestResult.runTime: object expected"); - message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ContinuousTestResult 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.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} message ContinuousTestResult + * @param {google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContinuousTestResult.toObject = function toObject(message, options) { + ListEnvironmentsResponse.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.v3beta1.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3beta1.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]; + 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.v3beta1.Environment.toObject(message.environments[j], options); } - if (message.runTime != null && message.hasOwnProperty("runTime")) - object.runTime = $root.google.protobuf.Timestamp.toObject(message.runTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ContinuousTestResult to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @instance * @returns {Object.} JSON object */ - ContinuousTestResult.prototype.toJSON = function toJSON() { + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ContinuousTestResult + * Gets the default type url for ListEnvironmentsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ContinuousTestResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse"; }; - /** - * AggregatedTestResult enum. - * @name google.cloud.dialogflow.cx.v3beta1.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; + return ListEnvironmentsResponse; })(); - v3beta1.RunContinuousTestRequest = (function() { + v3beta1.GetEnvironmentRequest = (function() { /** - * Properties of a RunContinuousTestRequest. + * Properties of a GetEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRunContinuousTestRequest - * @property {string|null} [environment] RunContinuousTestRequest environment + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name */ /** - * Constructs a new RunContinuousTestRequest. + * Constructs a new GetEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RunContinuousTestRequest. - * @implements IRunContinuousTestRequest + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set */ - function RunContinuousTestRequest(properties) { + function GetEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113534,75 +117398,75 @@ } /** - * RunContinuousTestRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @instance */ - RunContinuousTestRequest.prototype.environment = ""; + GetEnvironmentRequest.prototype.name = ""; /** - * Creates a new RunContinuousTestRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest instance */ - RunContinuousTestRequest.create = function create(properties) { - return new RunContinuousTestRequest(properties); + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); }; /** - * Encodes the specified RunContinuousTestRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified RunContinuousTestRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunContinuousTestRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunContinuousTestRequest.decode = function decode(reader, length) { + GetEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.environment = reader.string(); + message.name = reader.string(); break; } default: @@ -113614,122 +117478,123 @@ }; /** - * Decodes a RunContinuousTestRequest 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.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunContinuousTestRequest.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 RunContinuousTestRequest message. + * Verifies a GetEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunContinuousTestRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a RunContinuousTestRequest 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.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} GetEnvironmentRequest */ - RunContinuousTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(); - if (object.environment != null) - message.environment = String(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a RunContinuousTestRequest 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.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} message RunContinuousTestRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest} message GetEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunContinuousTestRequest.toObject = function toObject(message, options) { + GetEnvironmentRequest.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; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this RunContinuousTestRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @instance * @returns {Object.} JSON object */ - RunContinuousTestRequest.prototype.toJSON = function toJSON() { + GetEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunContinuousTestRequest + * Gets the default type url for GetEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunContinuousTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest"; }; - return RunContinuousTestRequest; + return GetEnvironmentRequest; })(); - v3beta1.RunContinuousTestResponse = (function() { + v3beta1.CreateEnvironmentRequest = (function() { /** - * Properties of a RunContinuousTestResponse. + * Properties of a CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRunContinuousTestResponse - * @property {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult|null} [continuousTestResult] RunContinuousTestResponse continuousTestResult + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment */ /** - * Constructs a new RunContinuousTestResponse. + * Constructs a new CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RunContinuousTestResponse. - * @implements IRunContinuousTestResponse + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set */ - function RunContinuousTestResponse(properties) { + function CreateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113737,75 +117602,89 @@ } /** - * RunContinuousTestResponse continuousTestResult. - * @member {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult|null|undefined} continuousTestResult - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @instance */ - RunContinuousTestResponse.prototype.continuousTestResult = null; + CreateEnvironmentRequest.prototype.parent = ""; /** - * Creates a new RunContinuousTestResponse instance using the specified properties. + * CreateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ - RunContinuousTestResponse.create = function create(properties) { - return new RunContinuousTestResponse(properties); + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); }; /** - * Encodes the specified RunContinuousTestResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestResponse.encode = function encode(message, writer) { + CreateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.continuousTestResult != null && Object.hasOwnProperty.call(message, "continuousTestResult")) - $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.encode(message.continuousTestResult, 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.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunContinuousTestResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestResponse} message RunContinuousTestResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunContinuousTestResponse message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @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) { + CreateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + } + case 2: { + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); break; } default: @@ -113817,128 +117696,137 @@ }; /** - * Decodes a RunContinuousTestResponse 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.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @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) { + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunContinuousTestResponse message. + * Verifies a CreateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @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) { + CreateEnvironmentRequest.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.v3beta1.ContinuousTestResult.verify(message.continuousTestResult); + 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.v3beta1.Environment.verify(message.environment); if (error) - return "continuousTestResult." + error; + return "environment." + error; } return null; }; /** - * Creates a RunContinuousTestResponse 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.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} CreateEnvironmentRequest */ - RunContinuousTestResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(); - if (object.continuousTestResult != null) { - if (typeof object.continuousTestResult !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.continuousTestResult: object expected"); - message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.fromObject(object.continuousTestResult); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); } return message; }; /** - * Creates a plain object from a RunContinuousTestResponse 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.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} message RunContinuousTestResponse + * @param {google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunContinuousTestResponse.toObject = function toObject(message, options) { + CreateEnvironmentRequest.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.v3beta1.ContinuousTestResult.toObject(message.continuousTestResult, options); + if (options.defaults) { + object.parent = ""; + object.environment = null; + } + 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.v3beta1.Environment.toObject(message.environment, options); return object; }; /** - * Converts this RunContinuousTestResponse to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - RunContinuousTestResponse.prototype.toJSON = function toJSON() { + CreateEnvironmentRequest.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 CreateEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunContinuousTestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest"; }; - return RunContinuousTestResponse; + return CreateEnvironmentRequest; })(); - v3beta1.RunContinuousTestMetadata = (function() { + v3beta1.UpdateEnvironmentRequest = (function() { /** - * Properties of a RunContinuousTestMetadata. + * Properties of an UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRunContinuousTestMetadata - * @property {Array.|null} [errors] RunContinuousTestMetadata errors + * @interface IUpdateEnvironmentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask */ /** - * Constructs a new RunContinuousTestMetadata. + * Constructs a new UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RunContinuousTestMetadata. - * @implements IRunContinuousTestMetadata + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set */ - function RunContinuousTestMetadata(properties) { - this.errors = []; + function UpdateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -113946,78 +117834,89 @@ } /** - * RunContinuousTestMetadata errors. - * @member {Array.} errors - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @instance */ - RunContinuousTestMetadata.prototype.errors = $util.emptyArray; + UpdateEnvironmentRequest.prototype.environment = null; /** - * Creates a new RunContinuousTestMetadata instance using the specified properties. + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ - RunContinuousTestMetadata.create = function create(properties) { - return new RunContinuousTestMetadata(properties); + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); }; /** - * Encodes the specified RunContinuousTestMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestMetadata.encode = function encode(message, writer) { + UpdateEnvironmentRequest.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.v3beta1.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.cx.v3beta1.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 RunContinuousTestMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunContinuousTestMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunContinuousTestMetadata message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @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) { + UpdateEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.dialogflow.cx.v3beta1.TestError.decode(reader, reader.uint32())); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -114029,141 +117928,141 @@ }; /** - * Decodes a RunContinuousTestMetadata 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.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @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) { + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunContinuousTestMetadata message. + * Verifies an UpdateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @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) { + UpdateEnvironmentRequest.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.v3beta1.TestError.verify(message.errors[i]); - if (error) - return "errors." + error; - } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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 RunContinuousTestMetadata 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.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ - RunContinuousTestMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestMetadata.errors: object expected"); - message.errors[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestError.fromObject(object.errors[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a RunContinuousTestMetadata 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.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} message RunContinuousTestMetadata + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunContinuousTestMetadata.toObject = function toObject(message, options) { + UpdateEnvironmentRequest.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.v3beta1.TestError.toObject(message.errors[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.v3beta1.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 RunContinuousTestMetadata to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - RunContinuousTestMetadata.prototype.toJSON = function toJSON() { + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunContinuousTestMetadata + * Gets the default type url for UpdateEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunContinuousTestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest"; }; - return RunContinuousTestMetadata; + return UpdateEnvironmentRequest; })(); - v3beta1.ListContinuousTestResultsRequest = (function() { + v3beta1.DeleteEnvironmentRequest = (function() { /** - * Properties of a ListContinuousTestResultsRequest. + * Properties of a DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListContinuousTestResultsRequest - * @property {string|null} [parent] ListContinuousTestResultsRequest parent - * @property {number|null} [pageSize] ListContinuousTestResultsRequest pageSize - * @property {string|null} [pageToken] ListContinuousTestResultsRequest pageToken + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name */ /** - * Constructs a new ListContinuousTestResultsRequest. + * Constructs a new DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListContinuousTestResultsRequest. - * @implements IListContinuousTestResultsRequest + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set */ - function ListContinuousTestResultsRequest(properties) { + function DeleteEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114171,103 +118070,75 @@ } /** - * ListContinuousTestResultsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest - * @instance - */ - ListContinuousTestResultsRequest.prototype.parent = ""; - - /** - * ListContinuousTestResultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest - * @instance - */ - ListContinuousTestResultsRequest.prototype.pageSize = 0; - - /** - * ListContinuousTestResultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @instance */ - ListContinuousTestResultsRequest.prototype.pageToken = ""; + DeleteEnvironmentRequest.prototype.name = ""; /** - * Creates a new ListContinuousTestResultsRequest instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ - ListContinuousTestResultsRequest.create = function create(properties) { - return new ListContinuousTestResultsRequest(properties); + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); }; /** - * Encodes the specified ListContinuousTestResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsRequest.encode = function encode(message, writer) { + DeleteEnvironmentRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListContinuousTestResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @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) { + DeleteEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -114279,141 +118150,124 @@ }; /** - * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @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) { + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListContinuousTestResultsRequest message. + * Verifies a DeleteEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @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) { + DeleteEnvironmentRequest.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 ListContinuousTestResultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ - ListContinuousTestResultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListContinuousTestResultsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} message ListContinuousTestResultsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListContinuousTestResultsRequest.toObject = function toObject(message, options) { + DeleteEnvironmentRequest.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 ListContinuousTestResultsRequest to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListContinuousTestResultsRequest.prototype.toJSON = function toJSON() { + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListContinuousTestResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest"; }; - return ListContinuousTestResultsRequest; + return DeleteEnvironmentRequest; })(); - v3beta1.ListContinuousTestResultsResponse = (function() { + v3beta1.LookupEnvironmentHistoryRequest = (function() { /** - * Properties of a ListContinuousTestResultsResponse. + * Properties of a LookupEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListContinuousTestResultsResponse - * @property {Array.|null} [continuousTestResults] ListContinuousTestResultsResponse continuousTestResults - * @property {string|null} [nextPageToken] ListContinuousTestResultsResponse nextPageToken + * @interface ILookupEnvironmentHistoryRequest + * @property {string|null} [name] LookupEnvironmentHistoryRequest name + * @property {number|null} [pageSize] LookupEnvironmentHistoryRequest pageSize + * @property {string|null} [pageToken] LookupEnvironmentHistoryRequest pageToken */ /** - * Constructs a new ListContinuousTestResultsResponse. + * Constructs a new LookupEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListContinuousTestResultsResponse. - * @implements IListContinuousTestResultsResponse + * @classdesc Represents a LookupEnvironmentHistoryRequest. + * @implements ILookupEnvironmentHistoryRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set */ - function ListContinuousTestResultsResponse(properties) { - this.continuousTestResults = []; + function LookupEnvironmentHistoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114421,92 +118275,103 @@ } /** - * ListContinuousTestResultsResponse continuousTestResults. - * @member {Array.} continuousTestResults - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * LookupEnvironmentHistoryRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance */ - ListContinuousTestResultsResponse.prototype.continuousTestResults = $util.emptyArray; + LookupEnvironmentHistoryRequest.prototype.name = ""; /** - * ListContinuousTestResultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * LookupEnvironmentHistoryRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance */ - ListContinuousTestResultsResponse.prototype.nextPageToken = ""; + LookupEnvironmentHistoryRequest.prototype.pageSize = 0; /** - * Creates a new ListContinuousTestResultsResponse instance using the specified properties. + * LookupEnvironmentHistoryRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + * @instance + */ + LookupEnvironmentHistoryRequest.prototype.pageToken = ""; + + /** + * Creates a new LookupEnvironmentHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest instance */ - ListContinuousTestResultsResponse.create = function create(properties) { - return new ListContinuousTestResultsResponse(properties); + LookupEnvironmentHistoryRequest.create = function create(properties) { + return new LookupEnvironmentHistoryRequest(properties); }; /** - * Encodes the specified ListContinuousTestResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsResponse.encode = function encode(message, writer) { + LookupEnvironmentHistoryRequest.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.v3beta1.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); + 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); return writer; }; /** - * Encodes the specified ListContinuousTestResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListContinuousTestResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @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) { + LookupEnvironmentHistoryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.continuousTestResults && message.continuousTestResults.length)) - message.continuousTestResults = []; - message.continuousTestResults.push($root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -114518,149 +118383,141 @@ }; /** - * Decodes a ListContinuousTestResultsResponse 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.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest * @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) { + LookupEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListContinuousTestResultsResponse message. + * Verifies a LookupEnvironmentHistoryRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @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) { + LookupEnvironmentHistoryRequest.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.v3beta1.ContinuousTestResult.verify(message.continuousTestResults[i]); - if (error) - return "continuousTestResults." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string 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"; return null; }; /** - * Creates a ListContinuousTestResultsResponse 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.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} LookupEnvironmentHistoryRequest */ - ListContinuousTestResultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) + LookupEnvironmentHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse(); - if (object.continuousTestResults) { - if (!Array.isArray(object.continuousTestResults)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListContinuousTestResultsResponse.continuousTestResults: object expected"); - message.continuousTestResults[i] = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.fromObject(object.continuousTestResults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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); return message; }; /** - * Creates a plain object from a ListContinuousTestResultsResponse 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.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} message ListContinuousTestResultsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest} message LookupEnvironmentHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListContinuousTestResultsResponse.toObject = function toObject(message, options) { + LookupEnvironmentHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.continuousTestResults = []; - 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.v3beta1.ContinuousTestResult.toObject(message.continuousTestResults[j], options); + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + 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; return object; }; /** - * Converts this ListContinuousTestResultsResponse to JSON. + * Converts this LookupEnvironmentHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @instance * @returns {Object.} JSON object */ - ListContinuousTestResultsResponse.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryRequest.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 LookupEnvironmentHistoryRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListContinuousTestResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LookupEnvironmentHistoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest"; }; - return ListContinuousTestResultsResponse; + return LookupEnvironmentHistoryRequest; })(); - v3beta1.DeployFlowRequest = (function() { + v3beta1.LookupEnvironmentHistoryResponse = (function() { /** - * Properties of a DeployFlowRequest. + * Properties of a LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeployFlowRequest - * @property {string|null} [environment] DeployFlowRequest environment - * @property {string|null} [flowVersion] DeployFlowRequest flowVersion + * @interface ILookupEnvironmentHistoryResponse + * @property {Array.|null} [environments] LookupEnvironmentHistoryResponse environments + * @property {string|null} [nextPageToken] LookupEnvironmentHistoryResponse nextPageToken */ /** - * Constructs a new DeployFlowRequest. + * Constructs a new LookupEnvironmentHistoryResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeployFlowRequest. - * @implements IDeployFlowRequest + * @classdesc Represents a LookupEnvironmentHistoryResponse. + * @implements ILookupEnvironmentHistoryResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set */ - function DeployFlowRequest(properties) { + function LookupEnvironmentHistoryResponse(properties) { + this.environments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114668,89 +118525,92 @@ } /** - * DeployFlowRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * LookupEnvironmentHistoryResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance */ - DeployFlowRequest.prototype.environment = ""; + LookupEnvironmentHistoryResponse.prototype.environments = $util.emptyArray; /** - * DeployFlowRequest flowVersion. - * @member {string} flowVersion - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * LookupEnvironmentHistoryResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance */ - DeployFlowRequest.prototype.flowVersion = ""; + LookupEnvironmentHistoryResponse.prototype.nextPageToken = ""; /** - * Creates a new DeployFlowRequest instance using the specified properties. + * Creates a new LookupEnvironmentHistoryResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse instance */ - DeployFlowRequest.create = function create(properties) { - return new DeployFlowRequest(properties); + LookupEnvironmentHistoryResponse.create = function create(properties) { + return new LookupEnvironmentHistoryResponse(properties); }; /** - * Encodes the specified DeployFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowRequest.encode = function encode(message, writer) { + LookupEnvironmentHistoryResponse.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.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 DeployFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.verify|verify} messages. + * Encodes the specified LookupEnvironmentHistoryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ILookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { + LookupEnvironmentHistoryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowRequest message from the specified reader or buffer. + * Decodes a LookupEnvironmentHistoryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @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) { + LookupEnvironmentHistoryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.environment = reader.string(); + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32())); break; } case 2: { - message.flowVersion = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -114762,132 +118622,152 @@ }; /** - * Decodes a DeployFlowRequest 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.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse * @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) { + LookupEnvironmentHistoryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowRequest message. + * Verifies a LookupEnvironmentHistoryResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @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) { + LookupEnvironmentHistoryResponse.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.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.v3beta1.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"; return null; }; /** - * Creates a DeployFlowRequest 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.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} LookupEnvironmentHistoryResponse */ - DeployFlowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) + LookupEnvironmentHistoryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.LookupEnvironmentHistoryResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeployFlowRequest 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.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} message DeployFlowRequest + * @param {google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse} message LookupEnvironmentHistoryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowRequest.toObject = function toObject(message, options) { + LookupEnvironmentHistoryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.environment = ""; - object.flowVersion = ""; + 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.v3beta1.Environment.toObject(message.environments[j], options); } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) - object.flowVersion = message.flowVersion; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeployFlowRequest to JSON. + * Converts this LookupEnvironmentHistoryResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @instance * @returns {Object.} JSON object */ - DeployFlowRequest.prototype.toJSON = function toJSON() { + LookupEnvironmentHistoryResponse.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 LookupEnvironmentHistoryResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LookupEnvironmentHistoryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse"; }; - return DeployFlowRequest; + return LookupEnvironmentHistoryResponse; })(); - v3beta1.DeployFlowResponse = (function() { + v3beta1.ContinuousTestResult = (function() { /** - * Properties of a DeployFlowResponse. + * Properties of a ContinuousTestResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeployFlowResponse - * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] DeployFlowResponse environment - * @property {string|null} [deployment] DeployFlowResponse deployment + * @interface IContinuousTestResult + * @property {string|null} [name] ContinuousTestResult name + * @property {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult|null} [result] ContinuousTestResult result + * @property {Array.|null} [testCaseResults] ContinuousTestResult testCaseResults + * @property {google.protobuf.ITimestamp|null} [runTime] ContinuousTestResult runTime */ /** - * Constructs a new DeployFlowResponse. + * Constructs a new ContinuousTestResult. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeployFlowResponse. - * @implements IDeployFlowResponse + * @classdesc Represents a ContinuousTestResult. + * @implements IContinuousTestResult * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult=} [properties] Properties to set */ - function DeployFlowResponse(properties) { + function ContinuousTestResult(properties) { + this.testCaseResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -114895,89 +118775,120 @@ } /** - * DeployFlowResponse environment. - * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * ContinuousTestResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @instance */ - DeployFlowResponse.prototype.environment = null; + ContinuousTestResult.prototype.name = ""; /** - * DeployFlowResponse deployment. - * @member {string} deployment - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * ContinuousTestResult result. + * @member {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult} result + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @instance */ - DeployFlowResponse.prototype.deployment = ""; + ContinuousTestResult.prototype.result = 0; /** - * Creates a new DeployFlowResponse instance using the specified properties. + * ContinuousTestResult testCaseResults. + * @member {Array.} testCaseResults + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @instance + */ + ContinuousTestResult.prototype.testCaseResults = $util.emptyArray; + + /** + * ContinuousTestResult runTime. + * @member {google.protobuf.ITimestamp|null|undefined} runTime + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + * @instance + */ + ContinuousTestResult.prototype.runTime = null; + + /** + * Creates a new ContinuousTestResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} DeployFlowResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult instance */ - DeployFlowResponse.create = function create(properties) { - return new DeployFlowResponse(properties); + ContinuousTestResult.create = function create(properties) { + return new ContinuousTestResult(properties); }; /** - * Encodes the specified DeployFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.verify|verify} messages. + * Encodes the specified ContinuousTestResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult} message ContinuousTestResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowResponse.encode = function encode(message, writer) { + ContinuousTestResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.cx.v3beta1.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); + 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 DeployFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.verify|verify} messages. + * Encodes the specified ContinuousTestResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowResponse} message DeployFlowResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult} message ContinuousTestResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowResponse.encodeDelimited = function encodeDelimited(message, writer) { + ContinuousTestResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowResponse message from the specified reader or buffer. + * Decodes a ContinuousTestResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult * @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) { + ContinuousTestResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.deployment = reader.string(); + 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: @@ -114989,137 +118900,205 @@ }; /** - * Decodes a DeployFlowResponse 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.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult * @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) { + ContinuousTestResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowResponse message. + * Verifies a ContinuousTestResult message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @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) { + ContinuousTestResult.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.v3beta1.Environment.verify(message.environment); + 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 "environment." + error; + return "runTime." + 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 ContinuousTestResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} DeployFlowResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} ContinuousTestResult */ - DeployFlowResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) + ContinuousTestResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.ContinuousTestResult.runTime: object expected"); + message.runTime = $root.google.protobuf.Timestamp.fromObject(object.runTime); } - 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 ContinuousTestResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} message DeployFlowResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult} message ContinuousTestResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowResponse.toObject = function toObject(message, options) { + ContinuousTestResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.testCaseResults = []; if (options.defaults) { - object.environment = null; - object.deployment = ""; + object.name = ""; + object.result = options.enums === String ? "AGGREGATED_TEST_RESULT_UNSPECIFIED" : 0; + object.runTime = null; } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.toObject(message.environment, options); - if (message.deployment != null && message.hasOwnProperty("deployment")) - object.deployment = message.deployment; + 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.v3beta1.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3beta1.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; }; /** - * Converts this DeployFlowResponse to JSON. + * Converts this ContinuousTestResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @instance * @returns {Object.} JSON object */ - DeployFlowResponse.prototype.toJSON = function toJSON() { + ContinuousTestResult.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 ContinuousTestResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContinuousTestResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult"; }; - return DeployFlowResponse; + /** + * AggregatedTestResult enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; })(); - v3beta1.DeployFlowMetadata = (function() { + v3beta1.RunContinuousTestRequest = (function() { /** - * Properties of a DeployFlowMetadata. + * Properties of a RunContinuousTestRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeployFlowMetadata - * @property {Array.|null} [testErrors] DeployFlowMetadata testErrors + * @interface IRunContinuousTestRequest + * @property {string|null} [environment] RunContinuousTestRequest environment */ /** - * Constructs a new DeployFlowMetadata. + * Constructs a new RunContinuousTestRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeployFlowMetadata. - * @implements IDeployFlowMetadata + * @classdesc Represents a RunContinuousTestRequest. + * @implements IRunContinuousTestRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest=} [properties] Properties to set */ - function DeployFlowMetadata(properties) { - this.testErrors = []; + function RunContinuousTestRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -115127,78 +119106,75 @@ } /** - * DeployFlowMetadata testErrors. - * @member {Array.} testErrors - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * RunContinuousTestRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @instance */ - DeployFlowMetadata.prototype.testErrors = $util.emptyArray; + RunContinuousTestRequest.prototype.environment = ""; /** - * Creates a new DeployFlowMetadata instance using the specified properties. + * Creates a new RunContinuousTestRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest instance */ - DeployFlowMetadata.create = function create(properties) { - return new DeployFlowMetadata(properties); + RunContinuousTestRequest.create = function create(properties) { + return new RunContinuousTestRequest(properties); }; /** - * Encodes the specified DeployFlowMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.verify|verify} messages. + * Encodes the specified RunContinuousTestRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowMetadata.encode = function encode(message, writer) { + RunContinuousTestRequest.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.v3beta1.TestError.encode(message.testErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).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 DeployFlowMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.verify|verify} messages. + * Encodes the specified RunContinuousTestRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestRequest} message RunContinuousTestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployFlowMetadata.encodeDelimited = function encodeDelimited(message, writer) { + RunContinuousTestRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployFlowMetadata message from the specified reader or buffer. + * Decodes a RunContinuousTestRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest * @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) { + RunContinuousTestRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.testErrors && message.testErrors.length)) - message.testErrors = []; - message.testErrors.push($root.google.cloud.dialogflow.cx.v3beta1.TestError.decode(reader, reader.uint32())); + message.environment = reader.string(); break; } default: @@ -115210,759 +119186,410 @@ }; /** - * Decodes a DeployFlowMetadata 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.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest * @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) { + RunContinuousTestRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployFlowMetadata message. + * Verifies a RunContinuousTestRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @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) { + RunContinuousTestRequest.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.v3beta1.TestError.verify(message.testErrors[i]); - if (error) - return "testErrors." + error; - } - } + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; return null; }; /** - * Creates a DeployFlowMetadata 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.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} RunContinuousTestRequest */ - DeployFlowMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + RunContinuousTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(); - if (object.testErrors) { - if (!Array.isArray(object.testErrors)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowMetadata.testErrors: object expected"); - message.testErrors[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestError.fromObject(object.testErrors[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest(); + if (object.environment != null) + message.environment = String(object.environment); return message; }; /** - * Creates a plain object from a DeployFlowMetadata 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.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} message DeployFlowMetadata + * @param {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest} message RunContinuousTestRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployFlowMetadata.toObject = function toObject(message, options) { + RunContinuousTestRequest.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.v3beta1.TestError.toObject(message.testErrors[j], options); - } + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; return object; }; /** - * Converts this DeployFlowMetadata to JSON. + * Converts this RunContinuousTestRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @instance * @returns {Object.} JSON object */ - DeployFlowMetadata.prototype.toJSON = function toJSON() { + RunContinuousTestRequest.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 RunContinuousTestRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployFlowMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunContinuousTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest"; }; - return DeployFlowMetadata; + return RunContinuousTestRequest; })(); - v3beta1.TestCases = (function() { + v3beta1.RunContinuousTestResponse = (function() { /** - * Constructs a new TestCases service. + * Properties of a RunContinuousTestResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TestCases - * @extends $protobuf.rpc.Service + * @interface IRunContinuousTestResponse + * @property {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult|null} [continuousTestResult] RunContinuousTestResponse continuousTestResult + */ + + /** + * Constructs a new RunContinuousTestResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a RunContinuousTestResponse. + * @implements IRunContinuousTestResponse * @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.v3beta1.IRunContinuousTestResponse=} [properties] Properties to set */ - function TestCases(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + 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]]; } - (TestCases.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestCases; + /** + * RunContinuousTestResponse continuousTestResult. + * @member {google.cloud.dialogflow.cx.v3beta1.IContinuousTestResult|null|undefined} continuousTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @instance + */ + RunContinuousTestResponse.prototype.continuousTestResult = null; /** - * Creates new TestCases service using the specified rpc implementation. + * Creates a new RunContinuousTestResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse * @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.v3beta1.IRunContinuousTestResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse instance */ - TestCases.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + RunContinuousTestResponse.create = function create(properties) { + return new RunContinuousTestResponse(properties); }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|listTestCases}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef ListTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} [response] ListTestCasesResponse + * Encodes the specified RunContinuousTestResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ContinuousTestResult.encode(message.continuousTestResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls ListTestCases. - * @function listTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} request ListTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.TestCases.ListTestCasesCallback} callback Node-style callback called with the error, if any, and ListTestCasesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified RunContinuousTestResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestResponse} message RunContinuousTestResponse 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.v3beta1.ListTestCasesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse, request, callback); - }, "name", { value: "ListTestCases" }); + RunContinuousTestResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListTestCases. - * @function listTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} request ListTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a RunContinuousTestResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|batchDeleteTestCases}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef BatchDeleteTestCasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a RunContinuousTestResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; /** - * Calls BatchDeleteTestCases. - * @function batchDeleteTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.TestCases.BatchDeleteTestCasesCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies a RunContinuousTestResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @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.v3beta1.BatchDeleteTestCasesRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "BatchDeleteTestCases" }); + 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.v3beta1.ContinuousTestResult.verify(message.continuousTestResult); + if (error) + return "continuousTestResult." + error; + } + return null; + }; /** - * Calls BatchDeleteTestCases. - * @function batchDeleteTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a RunContinuousTestResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse} RunContinuousTestResponse */ + RunContinuousTestResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse(); + if (object.continuousTestResult != null) { + if (typeof object.continuousTestResult !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.continuousTestResult: object expected"); + message.continuousTestResult = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.fromObject(object.continuousTestResult); + } + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|getTestCase}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef GetTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + * Creates a plain object from a RunContinuousTestResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ContinuousTestResult.toObject(message.continuousTestResult, options); + return object; + }; /** - * Calls GetTestCase. - * @function getTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * Converts this RunContinuousTestResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} request GetTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); - }, "name", { value: "GetTestCase" }); + RunContinuousTestResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetTestCase. - * @function getTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} request GetTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for RunContinuousTestResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestResponse"; + }; + + return RunContinuousTestResponse; + })(); + + v3beta1.RunContinuousTestMetadata = (function() { /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|createTestCase}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef CreateTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + * Properties of a RunContinuousTestMetadata. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IRunContinuousTestMetadata + * @property {Array.|null} [errors] RunContinuousTestMetadata errors */ /** - * Calls CreateTestCase. - * @function createTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.TestCases.CreateTestCaseCallback} callback Node-style callback called with the error, if any, and TestCase - * @returns {undefined} - * @variation 1 + * Constructs a new RunContinuousTestMetadata. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a RunContinuousTestMetadata. + * @implements IRunContinuousTestMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata=} [properties] Properties to set */ - Object.defineProperty(TestCases.prototype.createTestCase = function createTestCase(request, callback) { - return this.rpcCall(createTestCase, $root.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); - }, "name", { value: "CreateTestCase" }); + 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]]; + } /** - * Calls CreateTestCase. - * @function createTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * RunContinuousTestMetadata errors. + * @member {Array.} errors + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + RunContinuousTestMetadata.prototype.errors = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|updateTestCase}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef UpdateTestCaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + * Creates a new RunContinuousTestMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata instance */ + RunContinuousTestMetadata.create = function create(properties) { + return new RunContinuousTestMetadata(properties); + }; /** - * Calls UpdateTestCase. - * @function updateTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); - }, "name", { value: "UpdateTestCase" }); - - /** - * Calls UpdateTestCase. - * @function updateTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|runTestCase}. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} request RunTestCaseRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunTestCaseRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunTestCase" }); - - /** - * Calls RunTestCase. - * @function runTestCase - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} request RunTestCaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|batchRunTestCases}. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BatchRunTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchRunTestCases" }); - - /** - * Calls BatchRunTestCases. - * @function batchRunTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|calculateCoverage}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef CalculateCoverageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} [response] CalculateCoverageResponse - */ - - /** - * Calls CalculateCoverage. - * @function calculateCoverage - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageRequest, $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse, request, callback); - }, "name", { value: "CalculateCoverage" }); - - /** - * Calls CalculateCoverage. - * @function calculateCoverage - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|importTestCases}. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ImportTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportTestCases" }); - - /** - * Calls ImportTestCases. - * @function importTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|exportTestCases}. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ExportTestCasesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportTestCases" }); - - /** - * Calls ExportTestCases. - * @function exportTestCases - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|listTestCaseResults}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef ListTestCaseResultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse} [response] ListTestCaseResultsResponse - */ - - /** - * Calls ListTestCaseResults. - * @function listTestCaseResults - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCaseResultsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse, request, callback); - }, "name", { value: "ListTestCaseResults" }); - - /** - * Calls ListTestCaseResults. - * @function listTestCaseResults - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|getTestCaseResult}. - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @typedef GetTestCaseResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} [response] TestCaseResult - */ - - /** - * Calls GetTestCaseResult. - * @function getTestCaseResult - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, request, callback); - }, "name", { value: "GetTestCaseResult" }); - - /** - * Calls GetTestCaseResult. - * @function getTestCaseResult - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases - * @instance - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TestCases; - })(); - - v3beta1.TestCase = (function() { - - /** - * Properties of a TestCase. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1.ITestConfig|null} [testConfig] TestCase testConfig - * @property {Array.|null} [testCaseConversationTurns] TestCase testCaseConversationTurns - * @property {google.protobuf.ITimestamp|null} [creationTime] TestCase creationTime - * @property {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null} [lastTestResult] TestCase lastTestResult - */ - - /** - * Constructs a new TestCase. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TestCase. - * @implements ITestCase - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestCase name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.name = ""; - - /** - * TestCase tags. - * @member {Array.} tags - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.tags = $util.emptyArray; - - /** - * TestCase displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.displayName = ""; - - /** - * TestCase notes. - * @member {string} notes - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.notes = ""; - - /** - * TestCase testConfig. - * @member {google.cloud.dialogflow.cx.v3beta1.ITestConfig|null|undefined} testConfig - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.testConfig = null; - - /** - * TestCase testCaseConversationTurns. - * @member {Array.} testCaseConversationTurns - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.testCaseConversationTurns = $util.emptyArray; - - /** - * TestCase creationTime. - * @member {google.protobuf.ITimestamp|null|undefined} creationTime - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.creationTime = null; - - /** - * TestCase lastTestResult. - * @member {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null|undefined} lastTestResult - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @instance - */ - TestCase.prototype.lastTestResult = null; - - /** - * Creates a new TestCase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase instance - */ - TestCase.create = function create(properties) { - return new TestCase(properties); - }; - - /** - * Encodes the specified TestCase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCase.verify|verify} messages. + * Encodes the specified RunContinuousTestMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase} message TestCase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCase.encode = function encode(message, writer) { + RunContinuousTestMetadata.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.v3beta1.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.v3beta1.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.v3beta1.TestConfig.encode(message.testConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TestError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestCase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCase.verify|verify} messages. + * Encodes the specified RunContinuousTestMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase} message TestCase message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IRunContinuousTestMetadata} message RunContinuousTestMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCase.encodeDelimited = function encodeDelimited(message, writer) { + RunContinuousTestMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCase message from the specified reader or buffer. + * Decodes a RunContinuousTestMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata * @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) { + RunContinuousTestMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - 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.v3beta1.TestConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.testCaseConversationTurns && message.testCaseConversationTurns.length)) - message.testCaseConversationTurns = []; - message.testCaseConversationTurns.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseResult.decode(reader, reader.uint32()); + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.dialogflow.cx.v3beta1.TestError.decode(reader, reader.uint32())); break; } default: @@ -115974,230 +119601,141 @@ }; /** - * Decodes a TestCase message from the specified reader or buffer, length delimited. + * Decodes a RunContinuousTestMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata * @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) { + RunContinuousTestMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCase message. + * Verifies a RunContinuousTestMetadata message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @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) { + RunContinuousTestMetadata.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.v3beta1.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.v3beta1.ConversationTurn.verify(message.testCaseConversationTurns[i]); + 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.v3beta1.TestError.verify(message.errors[i]); if (error) - return "testCaseConversationTurns." + error; + return "errors." + 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.v3beta1.TestCaseResult.verify(message.lastTestResult); - if (error) - return "lastTestResult." + error; - } return null; }; /** - * Creates a TestCase message from a plain object. Also converts values to their respective internal types. + * Creates a RunContinuousTestMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase + * @returns {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} RunContinuousTestMetadata */ - TestCase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestCase) + RunContinuousTestMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCase(); - if (object.name != null) - message.name = String(object.name); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.testConfig: object expected"); - message.testConfig = $root.google.cloud.dialogflow.cx.v3beta1.TestConfig.fromObject(object.testConfig); - } - if (object.testCaseConversationTurns) { - if (!Array.isArray(object.testCaseConversationTurns)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.testCaseConversationTurns: object expected"); - message.testCaseConversationTurns[i] = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.fromObject(object.testCaseConversationTurns[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunContinuousTestMetadata.errors: object expected"); + message.errors[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestError.fromObject(object.errors[i]); } } - if (object.creationTime != null) { - if (typeof object.creationTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.lastTestResult: object expected"); - message.lastTestResult = $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.fromObject(object.lastTestResult); - } return message; }; /** - * Creates a plain object from a TestCase message. Also converts values to other types if specified. + * Creates a plain object from a RunContinuousTestMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} message TestCase + * @param {google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata} message RunContinuousTestMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCase.toObject = function toObject(message, options) { + RunContinuousTestMetadata.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; - } - 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.v3beta1.ConversationTurn.toObject(message.testCaseConversationTurns[j], options); + 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.v3beta1.TestError.toObject(message.errors[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.v3beta1.TestCaseResult.toObject(message.lastTestResult, options); - if (message.testConfig != null && message.hasOwnProperty("testConfig")) - object.testConfig = $root.google.cloud.dialogflow.cx.v3beta1.TestConfig.toObject(message.testConfig, options); return object; }; /** - * Converts this TestCase to JSON. + * Converts this RunContinuousTestMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @instance * @returns {Object.} JSON object */ - TestCase.prototype.toJSON = function toJSON() { + RunContinuousTestMetadata.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 RunContinuousTestMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunContinuousTestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestCase"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata"; }; - return TestCase; + return RunContinuousTestMetadata; })(); - v3beta1.TestCaseResult = (function() { + v3beta1.ListContinuousTestResultsRequest = (function() { /** - * Properties of a TestCaseResult. + * Properties of a ListContinuousTestResultsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1.TestResult|null} [testResult] TestCaseResult testResult - * @property {google.protobuf.ITimestamp|null} [testTime] TestCaseResult testTime + * @interface IListContinuousTestResultsRequest + * @property {string|null} [parent] ListContinuousTestResultsRequest parent + * @property {number|null} [pageSize] ListContinuousTestResultsRequest pageSize + * @property {string|null} [pageToken] ListContinuousTestResultsRequest pageToken */ /** - * Constructs a new TestCaseResult. + * Constructs a new ListContinuousTestResultsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TestCaseResult. - * @implements ITestCaseResult + * @classdesc Represents a ListContinuousTestResultsRequest. + * @implements IListContinuousTestResultsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest=} [properties] Properties to set */ - function TestCaseResult(properties) { - this.conversationTurns = []; + function ListContinuousTestResultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116205,134 +119743,103 @@ } /** - * TestCaseResult name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult - * @instance - */ - TestCaseResult.prototype.name = ""; - - /** - * TestCaseResult environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult - * @instance - */ - TestCaseResult.prototype.environment = ""; - - /** - * TestCaseResult conversationTurns. - * @member {Array.} conversationTurns - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * ListContinuousTestResultsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @instance */ - TestCaseResult.prototype.conversationTurns = $util.emptyArray; + ListContinuousTestResultsRequest.prototype.parent = ""; /** - * TestCaseResult testResult. - * @member {google.cloud.dialogflow.cx.v3beta1.TestResult} testResult - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * ListContinuousTestResultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @instance */ - TestCaseResult.prototype.testResult = 0; + ListContinuousTestResultsRequest.prototype.pageSize = 0; /** - * TestCaseResult testTime. - * @member {google.protobuf.ITimestamp|null|undefined} testTime - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * ListContinuousTestResultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @instance */ - TestCaseResult.prototype.testTime = null; + ListContinuousTestResultsRequest.prototype.pageToken = ""; /** - * Creates a new TestCaseResult instance using the specified properties. + * Creates a new ListContinuousTestResultsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest instance */ - TestCaseResult.create = function create(properties) { - return new TestCaseResult(properties); + ListContinuousTestResultsRequest.create = function create(properties) { + return new ListContinuousTestResultsRequest(properties); }; /** - * Encodes the specified TestCaseResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCaseResult.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseResult.encode = function encode(message, writer) { + ListContinuousTestResultsRequest.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.v3beta1.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.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 TestCaseResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCaseResult.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsRequest} message ListContinuousTestResultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestCaseResult.encodeDelimited = function encodeDelimited(message, writer) { + ListContinuousTestResultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestCaseResult message from the specified reader or buffer. + * Decodes a ListContinuousTestResultsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest * @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) { + ListContinuousTestResultsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.environment = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - if (!(message.conversationTurns && message.conversationTurns.length)) - message.conversationTurns = []; - message.conversationTurns.push($root.google.cloud.dialogflow.cx.v3beta1.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.pageToken = reader.string(); break; } default: @@ -116344,205 +119851,141 @@ }; /** - * Decodes a TestCaseResult 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.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest * @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) { + ListContinuousTestResultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestCaseResult message. + * Verifies a ListContinuousTestResultsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @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) { + ListContinuousTestResultsRequest.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.v3beta1.ConversationTurn.verify(message.conversationTurns[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; - } - if (message.testTime != null && message.hasOwnProperty("testTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.testTime); - if (error) - return "testTime." + error; - } + 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 TestCaseResult 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.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} ListContinuousTestResultsRequest */ - TestCaseResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + ListContinuousTestResultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.TestCaseResult.conversationTurns: object expected"); - message.conversationTurns[i] = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.fromObject(object.conversationTurns[i]); - } - } - switch (object.testResult) { - default: - if (typeof object.testResult === "number") { - message.testResult = object.testResult; - break; - } - 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.v3beta1.TestCaseResult.testTime: object expected"); - message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 TestCaseResult 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.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} message TestCaseResult + * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest} message ListContinuousTestResultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestCaseResult.toObject = function toObject(message, options) { + ListContinuousTestResultsRequest.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.v3beta1.ConversationTurn.toObject(message.conversationTurns[j], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.testResult != null && message.hasOwnProperty("testResult")) - object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] : message.testResult; - if (message.testTime != null && message.hasOwnProperty("testTime")) - object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); + 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 TestCaseResult to JSON. + * Converts this ListContinuousTestResultsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @instance * @returns {Object.} JSON object */ - TestCaseResult.prototype.toJSON = function toJSON() { + ListContinuousTestResultsRequest.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 ListContinuousTestResultsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestCaseResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContinuousTestResultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestCaseResult"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest"; }; - return TestCaseResult; + return ListContinuousTestResultsRequest; })(); - v3beta1.TestConfig = (function() { + v3beta1.ListContinuousTestResultsResponse = (function() { /** - * Properties of a TestConfig. + * Properties of a ListContinuousTestResultsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITestConfig - * @property {Array.|null} [trackingParameters] TestConfig trackingParameters - * @property {string|null} [flow] TestConfig flow - * @property {string|null} [page] TestConfig page + * @interface IListContinuousTestResultsResponse + * @property {Array.|null} [continuousTestResults] ListContinuousTestResultsResponse continuousTestResults + * @property {string|null} [nextPageToken] ListContinuousTestResultsResponse nextPageToken */ /** - * Constructs a new TestConfig. + * Constructs a new ListContinuousTestResultsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TestConfig. - * @implements ITestConfig + * @classdesc Represents a ListContinuousTestResultsResponse. + * @implements IListContinuousTestResultsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse=} [properties] Properties to set */ - function TestConfig(properties) { - this.trackingParameters = []; + function ListContinuousTestResultsResponse(properties) { + this.continuousTestResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116550,106 +119993,92 @@ } /** - * TestConfig trackingParameters. - * @member {Array.} trackingParameters - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig - * @instance - */ - TestConfig.prototype.trackingParameters = $util.emptyArray; - - /** - * TestConfig flow. - * @member {string} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * ListContinuousTestResultsResponse continuousTestResults. + * @member {Array.} continuousTestResults + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @instance */ - TestConfig.prototype.flow = ""; + ListContinuousTestResultsResponse.prototype.continuousTestResults = $util.emptyArray; /** - * TestConfig page. - * @member {string} page - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * ListContinuousTestResultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @instance */ - TestConfig.prototype.page = ""; + ListContinuousTestResultsResponse.prototype.nextPageToken = ""; /** - * Creates a new TestConfig instance using the specified properties. + * Creates a new ListContinuousTestResultsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse instance */ - TestConfig.create = function create(properties) { - return new TestConfig(properties); + ListContinuousTestResultsResponse.create = function create(properties) { + return new ListContinuousTestResultsResponse(properties); }; /** - * Encodes the specified TestConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestConfig.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig} message TestConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestConfig.encode = function encode(message, writer) { + ListContinuousTestResultsResponse.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.continuousTestResults != null && message.continuousTestResults.length) + for (var i = 0; i < message.continuousTestResults.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 TestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestConfig.verify|verify} messages. + * Encodes the specified ListContinuousTestResultsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig} message TestConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListContinuousTestResultsResponse} message ListContinuousTestResultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListContinuousTestResultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestConfig message from the specified reader or buffer. + * Decodes a ListContinuousTestResultsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse * @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) { + ListContinuousTestResultsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.trackingParameters && message.trackingParameters.length)) - message.trackingParameters = []; - message.trackingParameters.push(reader.string()); + if (!(message.continuousTestResults && message.continuousTestResults.length)) + message.continuousTestResults = []; + message.continuousTestResults.push($root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.decode(reader, reader.uint32())); break; } case 2: { - message.flow = reader.string(); - break; - } - case 3: { - message.page = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -116661,153 +120090,149 @@ }; /** - * Decodes a TestConfig 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.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse * @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) { + ListContinuousTestResultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestConfig message. + * Verifies a ListContinuousTestResultsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @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) { + ListContinuousTestResultsResponse.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.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.v3beta1.ContinuousTestResult.verify(message.continuousTestResults[i]); + if (error) + return "continuousTestResults." + 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"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a TestConfig 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.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} ListContinuousTestResultsResponse */ - TestConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestConfig) + ListContinuousTestResultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestConfig(); - if (object.trackingParameters) { - if (!Array.isArray(object.trackingParameters)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListContinuousTestResultsResponse(); + if (object.continuousTestResults) { + if (!Array.isArray(object.continuousTestResults)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListContinuousTestResultsResponse.continuousTestResults: object expected"); + message.continuousTestResults[i] = $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.fromObject(object.continuousTestResults[i]); + } } - if (object.flow != null) - message.flow = String(object.flow); - if (object.page != null) - message.page = String(object.page); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a TestConfig 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.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TestConfig} message TestConfig + * @param {google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse} message ListContinuousTestResultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestConfig.toObject = function toObject(message, options) { + ListContinuousTestResultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.trackingParameters = []; - if (options.defaults) { - object.flow = ""; - object.page = ""; - } - if (message.trackingParameters && message.trackingParameters.length) { - object.trackingParameters = []; - for (var j = 0; j < message.trackingParameters.length; ++j) - object.trackingParameters[j] = message.trackingParameters[j]; + object.continuousTestResults = []; + 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.v3beta1.ContinuousTestResult.toObject(message.continuousTestResults[j], options); } - if (message.flow != null && message.hasOwnProperty("flow")) - object.flow = message.flow; - if (message.page != null && message.hasOwnProperty("page")) - object.page = message.page; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this TestConfig to JSON. + * Converts this ListContinuousTestResultsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @instance * @returns {Object.} JSON object */ - TestConfig.prototype.toJSON = function toJSON() { + ListContinuousTestResultsResponse.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 ListContinuousTestResultsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListContinuousTestResultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse"; }; - return TestConfig; + return ListContinuousTestResultsResponse; })(); - v3beta1.ConversationTurn = (function() { + v3beta1.DeployFlowRequest = (function() { /** - * Properties of a ConversationTurn. + * Properties of a DeployFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IConversationTurn - * @property {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput|null} [userInput] ConversationTurn userInput - * @property {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput|null} [virtualAgentOutput] ConversationTurn virtualAgentOutput + * @interface IDeployFlowRequest + * @property {string|null} [environment] DeployFlowRequest environment + * @property {string|null} [flowVersion] DeployFlowRequest flowVersion */ /** - * Constructs a new ConversationTurn. + * Constructs a new DeployFlowRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ConversationTurn. - * @implements IConversationTurn + * @classdesc Represents a DeployFlowRequest. + * @implements IDeployFlowRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest=} [properties] Properties to set */ - function ConversationTurn(properties) { + function DeployFlowRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116815,89 +120240,89 @@ } /** - * ConversationTurn userInput. - * @member {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput|null|undefined} userInput - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * DeployFlowRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @instance */ - ConversationTurn.prototype.userInput = null; + DeployFlowRequest.prototype.environment = ""; /** - * ConversationTurn virtualAgentOutput. - * @member {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput|null|undefined} virtualAgentOutput - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * DeployFlowRequest flowVersion. + * @member {string} flowVersion + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @instance */ - ConversationTurn.prototype.virtualAgentOutput = null; + DeployFlowRequest.prototype.flowVersion = ""; /** - * Creates a new ConversationTurn instance using the specified properties. + * Creates a new DeployFlowRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest instance */ - ConversationTurn.create = function create(properties) { - return new ConversationTurn(properties); + DeployFlowRequest.create = function create(properties) { + return new DeployFlowRequest(properties); }; /** - * Encodes the specified ConversationTurn message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.verify|verify} messages. + * Encodes the specified DeployFlowRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn} message ConversationTurn message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationTurn.encode = function encode(message, writer) { + DeployFlowRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) - $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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); + if (message.flowVersion != null && Object.hasOwnProperty.call(message, "flowVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowVersion); return writer; }; /** - * Encodes the specified ConversationTurn message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.verify|verify} messages. + * Encodes the specified DeployFlowRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn} message ConversationTurn message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowRequest} message DeployFlowRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationTurn.encodeDelimited = function encodeDelimited(message, writer) { + DeployFlowRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationTurn message from the specified reader or buffer. + * Decodes a DeployFlowRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest * @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) { + DeployFlowRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.decode(reader, reader.uint32()); + message.environment = reader.string(); break; } case 2: { - message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.decode(reader, reader.uint32()); + message.flowVersion = reader.string(); break; } default: @@ -116909,836 +120334,1027 @@ }; /** - * Decodes a ConversationTurn message from the specified reader or buffer, length delimited. + * Decodes a DeployFlowRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest * @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) { + DeployFlowRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationTurn message. + * Verifies a DeployFlowRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @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) { + DeployFlowRequest.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.v3beta1.ConversationTurn.UserInput.verify(message.userInput); - if (error) - return "userInput." + error; - } - if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.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"; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + if (!$util.isString(message.flowVersion)) + return "flowVersion: string expected"; return null; }; /** - * Creates a ConversationTurn message from a plain object. Also converts values to their respective internal types. + * Creates a DeployFlowRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} DeployFlowRequest */ - ConversationTurn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) + DeployFlowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(); - if (object.userInput != null) { - if (typeof object.userInput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.userInput: object expected"); - message.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.fromObject(object.userInput); - } - if (object.virtualAgentOutput != null) { - if (typeof object.virtualAgentOutput !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.virtualAgentOutput: object expected"); - message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.fromObject(object.virtualAgentOutput); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.flowVersion != null) + message.flowVersion = String(object.flowVersion); return message; }; /** - * Creates a plain object from a ConversationTurn message. Also converts values to other types if specified. + * Creates a plain object from a DeployFlowRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} message ConversationTurn + * @param {google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest} message DeployFlowRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationTurn.toObject = function toObject(message, options) { + DeployFlowRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userInput = null; - object.virtualAgentOutput = null; + object.environment = ""; + object.flowVersion = ""; } - if (message.userInput != null && message.hasOwnProperty("userInput")) - object.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.toObject(message.userInput, options); - if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) - object.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.toObject(message.virtualAgentOutput, options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) + object.flowVersion = message.flowVersion; return object; }; /** - * Converts this ConversationTurn to JSON. + * Converts this DeployFlowRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @instance * @returns {Object.} JSON object */ - ConversationTurn.prototype.toJSON = function toJSON() { + DeployFlowRequest.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 DeployFlowRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationTurn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeployFlowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ConversationTurn"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest"; }; - ConversationTurn.UserInput = (function() { - - /** - * Properties of a UserInput. - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn - * @interface IUserInput - * @property {google.cloud.dialogflow.cx.v3beta1.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 - */ + return DeployFlowRequest; + })(); - /** - * Constructs a new UserInput. - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn - * @classdesc Represents a UserInput. - * @implements IUserInput - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + v3beta1.DeployFlowResponse = (function() { - /** - * UserInput input. - * @member {google.cloud.dialogflow.cx.v3beta1.IQueryInput|null|undefined} input - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.input = null; + /** + * Properties of a DeployFlowResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeployFlowResponse + * @property {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null} [environment] DeployFlowResponse environment + * @property {string|null} [deployment] DeployFlowResponse deployment + */ - /** - * UserInput injectedParameters. - * @member {google.protobuf.IStruct|null|undefined} injectedParameters - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.injectedParameters = null; + /** + * Constructs a new DeployFlowResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeployFlowResponse. + * @implements IDeployFlowResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - /** - * UserInput isWebhookEnabled. - * @member {boolean} isWebhookEnabled - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.isWebhookEnabled = false; + /** + * DeployFlowResponse environment. + * @member {google.cloud.dialogflow.cx.v3beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @instance + */ + DeployFlowResponse.prototype.environment = null; - /** - * UserInput enableSentimentAnalysis. - * @member {boolean} enableSentimentAnalysis - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @instance - */ - UserInput.prototype.enableSentimentAnalysis = false; + /** + * DeployFlowResponse deployment. + * @member {string} deployment + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @instance + */ + DeployFlowResponse.prototype.deployment = ""; - /** - * Creates a new UserInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput instance - */ - UserInput.create = function create(properties) { - return new UserInput(properties); - }; + /** + * Creates a new DeployFlowResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} DeployFlowResponse instance + */ + DeployFlowResponse.create = function create(properties) { + return new DeployFlowResponse(properties); + }; - /** - * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 DeployFlowResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; + }; - /** - * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + /** + * Encodes the specified DeployFlowResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; - /** - * Decodes a UserInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.input = $root.google.cloud.dialogflow.cx.v3beta1.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 DeployFlowResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deployment = reader.string(); 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.v3beta1.ConversationTurn.UserInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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 DeployFlowResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; - /** - * Creates a UserInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput - */ - UserInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(); - if (object.input != null) { - if (typeof object.input !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.input: object expected"); - message.input = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.fromObject(object.input); - } - if (object.injectedParameters != null) { - if (typeof object.injectedParameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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 DeployFlowResponse message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 UserInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.QueryInput.toObject(message.input, options); - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - object.enableSentimentAnalysis = message.enableSentimentAnalysis; + /** + * Creates a DeployFlowResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse} DeployFlowResponse + */ + DeployFlowResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse) return object; - }; - - /** - * Converts this UserInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.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 UserInput - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.UserInput"; - }; - - return UserInput; - })(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.cx.v3beta1.Environment.fromObject(object.environment); + } + if (object.deployment != null) + message.deployment = String(object.deployment); + return message; + }; - ConversationTurn.VirtualAgentOutput = (function() { + /** + * Creates a plain object from a DeployFlowResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Environment.toObject(message.environment, options); + if (message.deployment != null && message.hasOwnProperty("deployment")) + object.deployment = message.deployment; + return object; + }; - /** - * Properties of a VirtualAgentOutput. - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IIntent|null} [triggeredIntent] VirtualAgentOutput triggeredIntent - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [currentPage] VirtualAgentOutput currentPage - * @property {Array.|null} [textResponses] VirtualAgentOutput textResponses - * @property {google.rpc.IStatus|null} [status] VirtualAgentOutput status - */ + /** + * Converts this DeployFlowResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + * @instance + * @returns {Object.} JSON object + */ + DeployFlowResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new VirtualAgentOutput. - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn - * @classdesc Represents a VirtualAgentOutput. - * @implements IVirtualAgentOutput - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + /** + * Gets the default type url for DeployFlowResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowResponse"; + }; - /** - * VirtualAgentOutput sessionParameters. - * @member {google.protobuf.IStruct|null|undefined} sessionParameters - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.sessionParameters = null; + return DeployFlowResponse; + })(); - /** - * VirtualAgentOutput differences. - * @member {Array.} differences - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.differences = $util.emptyArray; + v3beta1.DeployFlowMetadata = (function() { - /** - * VirtualAgentOutput diagnosticInfo. - * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.diagnosticInfo = null; + /** + * Properties of a DeployFlowMetadata. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeployFlowMetadata + * @property {Array.|null} [testErrors] DeployFlowMetadata testErrors + */ - /** - * VirtualAgentOutput triggeredIntent. - * @member {google.cloud.dialogflow.cx.v3beta1.IIntent|null|undefined} triggeredIntent - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.triggeredIntent = null; + /** + * Constructs a new DeployFlowMetadata. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeployFlowMetadata. + * @implements IDeployFlowMetadata + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata=} [properties] Properties to set + */ + function DeployFlowMetadata(properties) { + this.testErrors = []; + if (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 currentPage. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} currentPage - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.currentPage = null; + /** + * DeployFlowMetadata testErrors. + * @member {Array.} testErrors + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @instance + */ + DeployFlowMetadata.prototype.testErrors = $util.emptyArray; - /** - * VirtualAgentOutput textResponses. - * @member {Array.} textResponses - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.textResponses = $util.emptyArray; + /** + * Creates a new DeployFlowMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata instance + */ + DeployFlowMetadata.create = function create(properties) { + return new DeployFlowMetadata(properties); + }; - /** - * VirtualAgentOutput status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - */ - VirtualAgentOutput.prototype.status = null; + /** + * Encodes the specified DeployFlowMetadata message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowMetadata.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.v3beta1.TestError.encode(message.testErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a new VirtualAgentOutput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput instance - */ - VirtualAgentOutput.create = function create(properties) { - return new VirtualAgentOutput(properties); - }; + /** + * Encodes the specified DeployFlowMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeployFlowMetadata} message DeployFlowMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployFlowMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified VirtualAgentOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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; - }; + /** + * Decodes a DeployFlowMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowMetadata} DeployFlowMetadata + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.testErrors && message.testErrors.length)) + message.testErrors = []; + message.testErrors.push($root.google.cloud.dialogflow.cx.v3beta1.TestError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified VirtualAgentOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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 DeployFlowMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a VirtualAgentOutput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.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.v3beta1.Intent.decode(reader, reader.uint32()); - break; - } - case 8: { - message.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.textResponses && message.textResponses.length)) - message.textResponses = []; - message.textResponses.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Intent.verify(message.triggeredIntent); - if (error) - return "triggeredIntent." + error; - } - if (message.currentPage != null && message.hasOwnProperty("currentPage")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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 DeployFlowMetadata message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @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) { + 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.v3beta1.TestError.verify(message.testErrors[i]); if (error) - return "status." + error; + return "testErrors." + error; } - return null; - }; + } + 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.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput - */ - VirtualAgentOutput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(); - if (object.sessionParameters != null) { - if (typeof object.sessionParameters !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.differences: object expected"); - message.differences[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.fromObject(object.differences[i]); - } - } - if (object.diagnosticInfo != null) { - if (typeof object.diagnosticInfo !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.triggeredIntent: object expected"); - message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3beta1.Intent.fromObject(object.triggeredIntent); - } - if (object.currentPage != null) { - if (typeof object.currentPage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.currentPage: object expected"); - message.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.currentPage); - } - if (object.textResponses) { - if (!Array.isArray(object.textResponses)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.textResponses: object expected"); - message.textResponses[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.textResponses[i]); - } - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); + /** + * Creates a DeployFlowMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} DeployFlowMetadata + */ + DeployFlowMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata(); + if (object.testErrors) { + if (!Array.isArray(object.testErrors)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeployFlowMetadata.testErrors: object expected"); + message.testErrors[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestError.fromObject(object.testErrors[i]); } - return message; - }; + } + 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.v3beta1.ConversationTurn.VirtualAgentOutput - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Intent.toObject(message.triggeredIntent, options); - if (message.currentPage != null && message.hasOwnProperty("currentPage")) - object.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; - }; + /** + * Creates a plain object from a DeployFlowMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata} message DeployFlowMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployFlowMetadata.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.v3beta1.TestError.toObject(message.testErrors[j], options); + } + return object; + }; - /** - * Converts this VirtualAgentOutput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput - * @instance - * @returns {Object.} JSON object - */ - VirtualAgentOutput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DeployFlowMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployFlowMetadata.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.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput"; - }; + /** + * Gets the default type url for DeployFlowMetadata + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployFlowMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata"; + }; - return VirtualAgentOutput; - })(); + return DeployFlowMetadata; + })(); - return ConversationTurn; + v3beta1.TestCases = (function() { + + /** + * Constructs a new TestCases service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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); + } + + (TestCases.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestCases; + + /** + * Creates new TestCases service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.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); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|listTestCases}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef ListTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} [response] ListTestCasesResponse + */ + + /** + * Calls ListTestCases. + * @function listTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} request ListTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse, request, callback); + }, "name", { value: "ListTestCases" }); + + /** + * Calls ListTestCases. + * @function listTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} request ListTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|batchDeleteTestCases}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef BatchDeleteTestCasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls BatchDeleteTestCases. + * @function batchDeleteTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BatchDeleteTestCasesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "BatchDeleteTestCases" }); + + /** + * Calls BatchDeleteTestCases. + * @function batchDeleteTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} request BatchDeleteTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|getTestCase}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef GetTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + */ + + /** + * Calls GetTestCase. + * @function getTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} request GetTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); + }, "name", { value: "GetTestCase" }); + + /** + * Calls GetTestCase. + * @function getTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} request GetTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|createTestCase}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef CreateTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + */ + + /** + * Calls CreateTestCase. + * @function createTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); + }, "name", { value: "CreateTestCase" }); + + /** + * Calls CreateTestCase. + * @function createTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} request CreateTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|updateTestCase}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef UpdateTestCaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} [response] TestCase + */ + + /** + * Calls UpdateTestCase. + * @function updateTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateTestCaseRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCase, request, callback); + }, "name", { value: "UpdateTestCase" }); + + /** + * Calls UpdateTestCase. + * @function updateTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} request UpdateTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|runTestCase}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} request RunTestCaseRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunTestCaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunTestCase" }); + + /** + * Calls RunTestCase. + * @function runTestCase + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} request RunTestCaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|batchRunTestCases}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BatchRunTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchRunTestCases" }); + + /** + * Calls BatchRunTestCases. + * @function batchRunTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchRunTestCasesRequest} request BatchRunTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|calculateCoverage}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef CalculateCoverageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} [response] CalculateCoverageResponse + */ + + /** + * Calls CalculateCoverage. + * @function calculateCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageRequest, $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse, request, callback); + }, "name", { value: "CalculateCoverage" }); + + /** + * Calls CalculateCoverage. + * @function calculateCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} request CalculateCoverageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|importTestCases}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ImportTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportTestCases" }); + + /** + * Calls ImportTestCases. + * @function importTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IImportTestCasesRequest} request ImportTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|exportTestCases}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ExportTestCasesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportTestCases" }); + + /** + * Calls ExportTestCases. + * @function exportTestCases + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IExportTestCasesRequest} request ExportTestCasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|listTestCaseResults}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef ListTestCaseResultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse} [response] ListTestCaseResultsResponse + */ + + /** + * Calls ListTestCaseResults. + * @function listTestCaseResults + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCaseResultsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse, request, callback); + }, "name", { value: "ListTestCaseResults" }); + + /** + * Calls ListTestCaseResults. + * @function listTestCaseResults + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCaseResultsRequest} request ListTestCaseResultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.TestCases|getTestCaseResult}. + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @typedef GetTestCaseResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} [response] TestCaseResult + */ + + /** + * Calls GetTestCaseResult. + * @function getTestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseResultRequest, $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult, request, callback); + }, "name", { value: "GetTestCaseResult" }); + + /** + * Calls GetTestCaseResult. + * @function getTestCaseResult + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCases + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseResultRequest} request GetTestCaseResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TestCases; })(); - v3beta1.TestRunDifference = (function() { + v3beta1.TestCase = (function() { /** - * Properties of a TestRunDifference. + * Properties of a TestCase. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITestRunDifference - * @property {google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType|null} [type] TestRunDifference type - * @property {string|null} [description] TestRunDifference description + * @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.v3beta1.ITestConfig|null} [testConfig] TestCase testConfig + * @property {Array.|null} [testCaseConversationTurns] TestCase testCaseConversationTurns + * @property {google.protobuf.ITimestamp|null} [creationTime] TestCase creationTime + * @property {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null} [lastTestResult] TestCase lastTestResult */ /** - * Constructs a new TestRunDifference. + * Constructs a new TestCase. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TestRunDifference. - * @implements ITestRunDifference + * @classdesc Represents a TestCase. + * @implements ITestCase * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase=} [properties] Properties to set */ - function TestRunDifference(properties) { + 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) @@ -117746,89 +121362,179 @@ } /** - * TestRunDifference type. - * @member {google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType} type - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * TestCase name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @instance */ - TestRunDifference.prototype.type = 0; + TestCase.prototype.name = ""; /** - * TestRunDifference description. - * @member {string} description - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * TestCase tags. + * @member {Array.} tags + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @instance */ - TestRunDifference.prototype.description = ""; + TestCase.prototype.tags = $util.emptyArray; /** - * Creates a new TestRunDifference instance using the specified properties. + * TestCase displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.displayName = ""; + + /** + * TestCase notes. + * @member {string} notes + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.notes = ""; + + /** + * TestCase testConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.ITestConfig|null|undefined} testConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.testConfig = null; + + /** + * TestCase testCaseConversationTurns. + * @member {Array.} testCaseConversationTurns + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.testCaseConversationTurns = $util.emptyArray; + + /** + * TestCase creationTime. + * @member {google.protobuf.ITimestamp|null|undefined} creationTime + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.creationTime = null; + + /** + * TestCase lastTestResult. + * @member {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null|undefined} lastTestResult + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + */ + TestCase.prototype.lastTestResult = null; + + /** + * Creates a new TestCase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase instance */ - TestRunDifference.create = function create(properties) { - return new TestRunDifference(properties); + TestCase.create = function create(properties) { + return new TestCase(properties); }; /** - * Encodes the specified TestRunDifference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestRunDifference.verify|verify} messages. + * Encodes the specified TestCase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference} message TestRunDifference message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase} message TestCase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestRunDifference.encode = function encode(message, writer) { + TestCase.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.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.v3beta1.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.v3beta1.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.v3beta1.TestConfig.encode(message.testConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified TestRunDifference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestRunDifference.verify|verify} messages. + * Encodes the specified TestCase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference} message TestRunDifference message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCase} message TestCase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TestRunDifference.encodeDelimited = function encodeDelimited(message, writer) { + TestCase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TestRunDifference message from the specified reader or buffer. + * Decodes a TestCase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase * @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) { + TestCase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.description = reader.string(); + 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.v3beta1.TestConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.testCaseConversationTurns && message.testCaseConversationTurns.length)) + message.testCaseConversationTurns = []; + message.testCaseConversationTurns.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseResult.decode(reader, reader.uint32()); break; } default: @@ -117840,194 +121546,840 @@ }; /** - * Decodes a TestRunDifference 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.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase * @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) { + TestCase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TestRunDifference message. + * Verifies a TestCase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @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) { + TestCase.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.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.v3beta1.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.v3beta1.ConversationTurn.verify(message.testCaseConversationTurns[i]); + if (error) + return "testCaseConversationTurns." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string 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.v3beta1.TestCaseResult.verify(message.lastTestResult); + if (error) + return "lastTestResult." + error; + } return null; }; /** - * Creates a TestRunDifference 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.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCase} TestCase */ - TestRunDifference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) + TestCase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestCase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(); - switch (object.type) { + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCase(); + if (object.name != null) + message.name = String(object.name); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.testConfig: object expected"); + message.testConfig = $root.google.cloud.dialogflow.cx.v3beta1.TestConfig.fromObject(object.testConfig); + } + if (object.testCaseConversationTurns) { + if (!Array.isArray(object.testCaseConversationTurns)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.testCaseConversationTurns: object expected"); + message.testCaseConversationTurns[i] = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.fromObject(object.testCaseConversationTurns[i]); + } + } + if (object.creationTime != null) { + if (typeof object.creationTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCase.lastTestResult: object expected"); + message.lastTestResult = $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult.fromObject(object.lastTestResult); + } + return message; + }; + + /** + * Creates a plain object from a TestCase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TestCase} message TestCase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestCase.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; + } + 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.v3beta1.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.v3beta1.TestCaseResult.toObject(message.lastTestResult, options); + if (message.testConfig != null && message.hasOwnProperty("testConfig")) + object.testConfig = $root.google.cloud.dialogflow.cx.v3beta1.TestConfig.toObject(message.testConfig, options); + return object; + }; + + /** + * Converts this TestCase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @instance + * @returns {Object.} JSON object + */ + TestCase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestCase + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestCase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestCase"; + }; + + return TestCase; + })(); + + v3beta1.TestCaseResult = (function() { + + /** + * Properties of a TestCaseResult. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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.v3beta1.TestResult|null} [testResult] TestCaseResult testResult + * @property {google.protobuf.ITimestamp|null} [testTime] TestCaseResult testTime + */ + + /** + * Constructs a new TestCaseResult. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TestCaseResult. + * @implements ITestCaseResult + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult=} [properties] Properties to set + */ + function TestCaseResult(properties) { + this.conversationTurns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestCaseResult name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @instance + */ + TestCaseResult.prototype.name = ""; + + /** + * TestCaseResult environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @instance + */ + TestCaseResult.prototype.environment = ""; + + /** + * TestCaseResult conversationTurns. + * @member {Array.} conversationTurns + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @instance + */ + TestCaseResult.prototype.conversationTurns = $util.emptyArray; + + /** + * TestCaseResult testResult. + * @member {google.cloud.dialogflow.cx.v3beta1.TestResult} testResult + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @instance + */ + TestCaseResult.prototype.testResult = 0; + + /** + * TestCaseResult testTime. + * @member {google.protobuf.ITimestamp|null|undefined} testTime + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @instance + */ + TestCaseResult.prototype.testTime = null; + + /** + * Creates a new TestCaseResult instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult instance + */ + TestCaseResult.create = function create(properties) { + return new TestCaseResult(properties); + }; + + /** + * Encodes the specified TestCaseResult message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCaseResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseResult.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.v3beta1.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 TestCaseResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestCaseResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult} message TestCaseResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestCaseResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestCaseResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseResult} TestCaseResult + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + 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.v3beta1.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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestCaseResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestCaseResult message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @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) { + 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.v3beta1.ConversationTurn.verify(message.conversationTurns[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; + } + 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 TestCaseResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} TestCaseResult + */ + TestCaseResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestCaseResult) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.TestCaseResult.conversationTurns: object expected"); + message.conversationTurns[i] = $root.google.cloud.dialogflow.cx.v3beta1.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 "DIFF_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": + case "FAILED": 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; + message.testResult = 2; break; } - if (object.description != null) - message.description = String(object.description); + if (object.testTime != null) { + if (typeof object.testTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TestCaseResult.testTime: object expected"); + message.testTime = $root.google.protobuf.Timestamp.fromObject(object.testTime); + } return message; }; /** - * Creates a plain object from a TestRunDifference 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.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} message TestRunDifference + * @param {google.cloud.dialogflow.cx.v3beta1.TestCaseResult} message TestCaseResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TestRunDifference.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 ? "DIFF_TYPE_UNSPECIFIED" : 0; - object.description = ""; + 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.v3beta1.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] : message.type; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + 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.v3beta1.ConversationTurn.toObject(message.conversationTurns[j], options); + } + if (message.testResult != null && message.hasOwnProperty("testResult")) + object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3beta1.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 TestRunDifference to JSON. + * Converts this TestCaseResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult * @instance * @returns {Object.} JSON object */ - TestRunDifference.prototype.toJSON = function toJSON() { + TestCaseResult.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 TestCaseResult * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference + * @memberof google.cloud.dialogflow.cx.v3beta1.TestCaseResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TestRunDifference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestCaseResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestRunDifference"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestCaseResult"; }; + return TestCaseResult; + })(); + + v3beta1.TestConfig = (function() { + /** - * DiffType enum. - * @name google.cloud.dialogflow.cx.v3beta1.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 + * Properties of a TestConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ITestConfig + * @property {Array.|null} [trackingParameters] TestConfig trackingParameters + * @property {string|null} [flow] TestConfig flow + * @property {string|null} [page] TestConfig page */ - 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; + /** + * Constructs a new TestConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TestConfig. + * @implements ITestConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig=} [properties] Properties to set + */ + function TestConfig(properties) { + this.trackingParameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestConfig trackingParameters. + * @member {Array.} trackingParameters + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @instance + */ + TestConfig.prototype.trackingParameters = $util.emptyArray; + + /** + * TestConfig flow. + * @member {string} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @instance + */ + TestConfig.prototype.flow = ""; + + /** + * TestConfig page. + * @member {string} page + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @instance + */ + TestConfig.prototype.page = ""; + + /** + * Creates a new TestConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig instance + */ + TestConfig.create = function create(properties) { + return new TestConfig(properties); + }; + + /** + * Encodes the specified TestConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig} message TestConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestConfig.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); + return writer; + }; + + /** + * Encodes the specified TestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITestConfig} message TestConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestConfig} TestConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.trackingParameters && message.trackingParameters.length)) + message.trackingParameters = []; + message.trackingParameters.push(reader.string()); + break; + } + case 2: { + message.flow = reader.string(); + break; + } + case 3: { + message.page = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @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) { + 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.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. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TestConfig} TestConfig + */ + TestConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestConfig(); + if (object.trackingParameters) { + if (!Array.isArray(object.trackingParameters)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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 TestConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TestConfig} message TestConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.trackingParameters = []; + if (options.defaults) { + object.flow = ""; + object.page = ""; + } + 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 TestConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @instance + * @returns {Object.} JSON object + */ + TestConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.TestConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestConfig"; + }; + + return TestConfig; })(); - v3beta1.TransitionCoverage = (function() { + v3beta1.ConversationTurn = (function() { /** - * Properties of a TransitionCoverage. + * Properties of a ConversationTurn. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITransitionCoverage - * @property {Array.|null} [transitions] TransitionCoverage transitions - * @property {number|null} [coverageScore] TransitionCoverage coverageScore + * @interface IConversationTurn + * @property {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput|null} [userInput] ConversationTurn userInput + * @property {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput|null} [virtualAgentOutput] ConversationTurn virtualAgentOutput */ /** - * Constructs a new TransitionCoverage. + * Constructs a new ConversationTurn. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TransitionCoverage. - * @implements ITransitionCoverage + * @classdesc Represents a ConversationTurn. + * @implements IConversationTurn * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn=} [properties] Properties to set */ - function TransitionCoverage(properties) { - this.transitions = []; + function ConversationTurn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118035,92 +122387,89 @@ } /** - * TransitionCoverage transitions. - * @member {Array.} transitions - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * ConversationTurn userInput. + * @member {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput|null|undefined} userInput + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @instance */ - TransitionCoverage.prototype.transitions = $util.emptyArray; + ConversationTurn.prototype.userInput = null; /** - * TransitionCoverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * ConversationTurn virtualAgentOutput. + * @member {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput|null|undefined} virtualAgentOutput + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @instance */ - TransitionCoverage.prototype.coverageScore = 0; + ConversationTurn.prototype.virtualAgentOutput = null; /** - * Creates a new TransitionCoverage instance using the specified properties. + * Creates a new ConversationTurn instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage instance + * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn instance */ - TransitionCoverage.create = function create(properties) { - return new TransitionCoverage(properties); + ConversationTurn.create = function create(properties) { + return new ConversationTurn(properties); }; /** - * Encodes the specified TransitionCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.verify|verify} messages. + * Encodes the specified ConversationTurn message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage} message TransitionCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn} message ConversationTurn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionCoverage.encode = function encode(message, writer) { + ConversationTurn.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.v3beta1.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.userInput != null && Object.hasOwnProperty.call(message, "userInput")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.encode(message.virtualAgentOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransitionCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.verify|verify} messages. + * Encodes the specified ConversationTurn message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage} message TransitionCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IConversationTurn} message ConversationTurn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionCoverage.encodeDelimited = function encodeDelimited(message, writer) { + ConversationTurn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionCoverage message from the specified reader or buffer. + * Decodes a ConversationTurn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn * @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) { + ConversationTurn.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.transitions && message.transitions.length)) - message.transitions = []; - message.transitions.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.decode(reader, reader.uint32())); + message.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.decode(reader, reader.uint32()); break; } case 2: { - message.coverageScore = reader.float(); + message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.decode(reader, reader.uint32()); break; } default: @@ -118132,146 +122481,141 @@ }; /** - * Decodes a TransitionCoverage 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.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn * @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) { + ConversationTurn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionCoverage message. + * Verifies a ConversationTurn message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @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) { + ConversationTurn.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.v3beta1.TransitionCoverage.Transition.verify(message.transitions[i]); - if (error) - return "transitions." + error; - } + if (message.userInput != null && message.hasOwnProperty("userInput")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.verify(message.userInput); + if (error) + return "userInput." + error; + } + if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.verify(message.virtualAgentOutput); + if (error) + return "virtualAgentOutput." + error; } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - if (typeof message.coverageScore !== "number") - return "coverageScore: number expected"; return null; }; /** - * Creates a TransitionCoverage 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.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} ConversationTurn */ - TransitionCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) + ConversationTurn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(); - if (object.transitions) { - if (!Array.isArray(object.transitions)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.transitions: object expected"); - message.transitions[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.fromObject(object.transitions[i]); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn(); + if (object.userInput != null) { + if (typeof object.userInput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.userInput: object expected"); + message.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.fromObject(object.userInput); + } + if (object.virtualAgentOutput != null) { + if (typeof object.virtualAgentOutput !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.virtualAgentOutput: object expected"); + message.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.fromObject(object.virtualAgentOutput); } - if (object.coverageScore != null) - message.coverageScore = Number(object.coverageScore); return message; }; /** - * Creates a plain object from a TransitionCoverage 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.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} message TransitionCoverage + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn} message ConversationTurn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionCoverage.toObject = function toObject(message, options) { + ConversationTurn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - 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.v3beta1.TransitionCoverage.Transition.toObject(message.transitions[j], options); + if (options.defaults) { + object.userInput = null; + object.virtualAgentOutput = null; } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + if (message.userInput != null && message.hasOwnProperty("userInput")) + object.userInput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.toObject(message.userInput, options); + if (message.virtualAgentOutput != null && message.hasOwnProperty("virtualAgentOutput")) + object.virtualAgentOutput = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.toObject(message.virtualAgentOutput, options); return object; }; /** - * Converts this TransitionCoverage to JSON. + * Converts this ConversationTurn to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @instance * @returns {Object.} JSON object */ - TransitionCoverage.prototype.toJSON = function toJSON() { + ConversationTurn.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 ConversationTurn * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationTurn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ConversationTurn"; }; - TransitionCoverage.TransitionNode = (function() { + ConversationTurn.UserInput = (function() { /** - * Properties of a TransitionNode. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage - * @interface ITransitionNode - * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] TransitionNode page - * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] TransitionNode flow + * Properties of a UserInput. + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @interface IUserInput + * @property {google.cloud.dialogflow.cx.v3beta1.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 */ /** - * Constructs a new TransitionNode. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage - * @classdesc Represents a TransitionNode. - * @implements ITransitionNode + * Constructs a new UserInput. + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @classdesc Represents a UserInput. + * @implements IUserInput * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput=} [properties] Properties to set */ - function TransitionNode(properties) { + function UserInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118279,103 +122623,117 @@ } /** - * TransitionNode page. - * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * UserInput input. + * @member {google.cloud.dialogflow.cx.v3beta1.IQueryInput|null|undefined} input + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @instance */ - TransitionNode.prototype.page = null; + UserInput.prototype.input = null; /** - * TransitionNode flow. - * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * UserInput injectedParameters. + * @member {google.protobuf.IStruct|null|undefined} injectedParameters + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @instance */ - TransitionNode.prototype.flow = null; + UserInput.prototype.injectedParameters = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UserInput isWebhookEnabled. + * @member {boolean} isWebhookEnabled + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput + * @instance + */ + UserInput.prototype.isWebhookEnabled = false; /** - * TransitionNode kind. - * @member {"page"|"flow"|undefined} kind - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * UserInput enableSentimentAnalysis. + * @member {boolean} enableSentimentAnalysis + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @instance */ - Object.defineProperty(TransitionNode.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["page", "flow"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserInput.prototype.enableSentimentAnalysis = false; /** - * Creates a new TransitionNode instance using the specified properties. + * Creates a new UserInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode instance + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput instance */ - TransitionNode.create = function create(properties) { - return new TransitionNode(properties); + UserInput.create = function create(properties) { + return new UserInput(properties); }; /** - * Encodes the specified TransitionNode message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.verify|verify} messages. + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput} message UserInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionNode.encode = function encode(message, writer) { + UserInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.page != null && Object.hasOwnProperty.call(message, "page")) - $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.v3beta1.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 TransitionNode message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.verify|verify} messages. + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IUserInput} message UserInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionNode.encodeDelimited = function encodeDelimited(message, writer) { + UserInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionNode message from the specified reader or buffer. + * Decodes a UserInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.TransitionNode} TransitionNode + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput * @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) { + UserInput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); + case 5: { + message.input = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.decode(reader, reader.uint32()); break; } case 2: { - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); + 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: @@ -118387,157 +122745,165 @@ }; /** - * Decodes a TransitionNode message from the specified reader or buffer, length delimited. + * Decodes a UserInput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput * @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) { + UserInput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionNode message. + * Verifies a UserInput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @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) { + UserInput.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.v3beta1.Page.verify(message.page); - if (error) - return "page." + error; - } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.verify(message.input); + if (error) + return "input." + 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.v3beta1.Flow.verify(message.flow); - if (error) - return "flow." + 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; }; /** - * Creates a TransitionNode message from a plain object. Also converts values to their respective internal types. + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} UserInput */ - TransitionNode.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) + UserInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(); - if (object.page != null) { - if (typeof object.page !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.page: object expected"); - message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput(); + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput.input: object expected"); + message.input = $root.google.cloud.dialogflow.cx.v3beta1.QueryInput.fromObject(object.input); } - if (object.flow != null) { - if (typeof object.flow !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.flow: object expected"); - message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + if (object.injectedParameters != null) { + if (typeof object.injectedParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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 TransitionNode message. Also converts values to other types if specified. + * Creates a plain object from a UserInput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} message TransitionNode + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput} message UserInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionNode.toObject = function toObject(message, options) { + UserInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.page != null && message.hasOwnProperty("page")) { - object.page = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Flow.toObject(message.flow, options); - if (options.oneofs) - object.kind = "flow"; + 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.v3beta1.QueryInput.toObject(message.input, options); + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + object.enableSentimentAnalysis = message.enableSentimentAnalysis; return object; }; /** - * Converts this TransitionNode to JSON. + * Converts this UserInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @instance * @returns {Object.} JSON object */ - TransitionNode.prototype.toJSON = function toJSON() { + UserInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransitionNode + * Gets the default type url for UserInput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ConversationTurn.UserInput"; }; - return TransitionNode; + return UserInput; })(); - TransitionCoverage.Transition = (function() { + ConversationTurn.VirtualAgentOutput = (function() { /** - * Properties of a Transition. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage - * @interface ITransition - * @property {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null} [source] Transition source - * @property {number|null} [index] Transition index - * @property {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null} [target] Transition target - * @property {boolean|null} [covered] Transition covered - * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null} [transitionRoute] Transition transitionRoute - * @property {google.cloud.dialogflow.cx.v3beta1.IEventHandler|null} [eventHandler] Transition eventHandler + * Properties of a VirtualAgentOutput. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IIntent|null} [triggeredIntent] VirtualAgentOutput triggeredIntent + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [currentPage] VirtualAgentOutput currentPage + * @property {Array.|null} [textResponses] VirtualAgentOutput textResponses + * @property {google.rpc.IStatus|null} [status] VirtualAgentOutput status */ /** - * Constructs a new Transition. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage - * @classdesc Represents a Transition. - * @implements ITransition + * Constructs a new VirtualAgentOutput. + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn + * @classdesc Represents a VirtualAgentOutput. + * @implements IVirtualAgentOutput * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransition=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set */ - function Transition(properties) { + 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) @@ -118545,159 +122911,165 @@ } /** - * Transition source. - * @member {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null|undefined} source - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput sessionParameters. + * @member {google.protobuf.IStruct|null|undefined} sessionParameters + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.source = null; + VirtualAgentOutput.prototype.sessionParameters = null; /** - * Transition index. - * @member {number} index - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput differences. + * @member {Array.} differences + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.index = 0; + VirtualAgentOutput.prototype.differences = $util.emptyArray; /** - * Transition target. - * @member {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null|undefined} target - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput diagnosticInfo. + * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.target = null; + VirtualAgentOutput.prototype.diagnosticInfo = null; /** - * Transition covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput triggeredIntent. + * @member {google.cloud.dialogflow.cx.v3beta1.IIntent|null|undefined} triggeredIntent + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.covered = false; + VirtualAgentOutput.prototype.triggeredIntent = null; /** - * Transition transitionRoute. - * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null|undefined} transitionRoute - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput currentPage. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} currentPage + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.transitionRoute = null; + VirtualAgentOutput.prototype.currentPage = null; /** - * Transition eventHandler. - * @member {google.cloud.dialogflow.cx.v3beta1.IEventHandler|null|undefined} eventHandler - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput textResponses. + * @member {Array.} textResponses + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Transition.prototype.eventHandler = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + VirtualAgentOutput.prototype.textResponses = $util.emptyArray; /** - * Transition detail. - * @member {"transitionRoute"|"eventHandler"|undefined} detail - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * VirtualAgentOutput status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance */ - Object.defineProperty(Transition.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["transitionRoute", "eventHandler"]), - set: $util.oneOfSetter($oneOfFields) - }); + VirtualAgentOutput.prototype.status = null; /** - * Creates a new Transition instance using the specified properties. + * Creates a new VirtualAgentOutput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransition=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} Transition instance + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput instance */ - Transition.create = function create(properties) { - return new Transition(properties); + VirtualAgentOutput.create = function create(properties) { + return new VirtualAgentOutput(properties); }; /** - * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.verify|verify} messages. + * Encodes the specified VirtualAgentOutput message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransition} message Transition message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Transition.encode = function encode(message, writer) { + VirtualAgentOutput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EventHandler.encode(message.eventHandler, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + 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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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 Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.verify|verify} messages. + * Encodes the specified VirtualAgentOutput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransition} message Transition message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.IVirtualAgentOutput} message VirtualAgentOutput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Transition.encodeDelimited = function encodeDelimited(message, writer) { + VirtualAgentOutput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Transition message from the specified reader or buffer. + * Decodes a VirtualAgentOutput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.Transition} Transition + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput * @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) { + VirtualAgentOutput.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.source = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + case 4: { + message.sessionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } - case 4: { - message.index = reader.int32(); + case 5: { + if (!(message.differences && message.differences.length)) + message.differences = []; + message.differences.push($root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.decode(reader, reader.uint32())); break; } - case 2: { - message.target = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + case 6: { + message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } - case 3: { - message.covered = reader.bool(); + case 7: { + message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3beta1.Intent.decode(reader, reader.uint32()); break; } - case 5: { - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32()); + case 8: { + message.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); break; } - case 6: { - message.eventHandler = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32()); + case 9: { + if (!(message.textResponses && message.textResponses.length)) + message.textResponses = []; + message.textResponses.push($root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.decode(reader, reader.uint32())); + break; + } + case 10: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } default: @@ -118709,201 +123081,236 @@ }; /** - * Decodes a Transition message from the specified reader or buffer, length delimited. + * Decodes a VirtualAgentOutput message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} Transition + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput * @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) { + VirtualAgentOutput.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Transition message. + * Verifies a VirtualAgentOutput message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @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) { + VirtualAgentOutput.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.v3beta1.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.v3beta1.TransitionCoverage.TransitionNode.verify(message.target); + if (message.sessionParameters != null && message.hasOwnProperty("sessionParameters")) { + var error = $root.google.protobuf.Struct.verify(message.sessionParameters); if (error) - return "target." + error; + return "sessionParameters." + 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.v3beta1.TransitionRoute.verify(message.transitionRoute); + 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.v3beta1.TestRunDifference.verify(message.differences[i]); if (error) - return "transitionRoute." + error; + return "differences." + 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.v3beta1.EventHandler.verify(message.eventHandler); + 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.v3beta1.Intent.verify(message.triggeredIntent); + if (error) + return "triggeredIntent." + error; + } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ResponseMessage.Text.verify(message.textResponses[i]); if (error) - return "eventHandler." + 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 Transition message from a plain object. Also converts values to their respective internal types. + * Creates a VirtualAgentOutput message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} Transition + * @returns {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} VirtualAgentOutput */ - Transition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + VirtualAgentOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.source: object expected"); - message.source = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.fromObject(object.source); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput(); + if (object.sessionParameters != null) { + if (typeof object.sessionParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.sessionParameters: object expected"); + message.sessionParameters = $root.google.protobuf.Struct.fromObject(object.sessionParameters); } - if (object.index != null) - message.index = object.index | 0; - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.target: object expected"); - message.target = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.fromObject(object.target); + if (object.differences) { + if (!Array.isArray(object.differences)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.differences: object expected"); + message.differences[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.fromObject(object.differences[i]); + } } - if (object.covered != null) - message.covered = Boolean(object.covered); - if (object.transitionRoute != null) { - if (typeof object.transitionRoute !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.transitionRoute: object expected"); - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoute); + if (object.diagnosticInfo != null) { + if (typeof object.diagnosticInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.diagnosticInfo: object expected"); + message.diagnosticInfo = $root.google.protobuf.Struct.fromObject(object.diagnosticInfo); } - if (object.eventHandler != null) { - if (typeof object.eventHandler !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.eventHandler: object expected"); - message.eventHandler = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.fromObject(object.eventHandler); + if (object.triggeredIntent != null) { + if (typeof object.triggeredIntent !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.triggeredIntent: object expected"); + message.triggeredIntent = $root.google.cloud.dialogflow.cx.v3beta1.Intent.fromObject(object.triggeredIntent); + } + if (object.currentPage != null) { + if (typeof object.currentPage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.currentPage: object expected"); + message.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.currentPage); + } + if (object.textResponses) { + if (!Array.isArray(object.textResponses)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ConversationTurn.VirtualAgentOutput.textResponses: object expected"); + message.textResponses[i] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text.fromObject(object.textResponses[i]); + } + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); } return message; }; /** - * Creates a plain object from a Transition message. Also converts values to other types if specified. + * Creates a plain object from a VirtualAgentOutput message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} message Transition + * @param {google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput} message VirtualAgentOutput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Transition.toObject = function toObject(message, options) { + VirtualAgentOutput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.differences = []; + object.textResponses = []; + } if (options.defaults) { - object.source = null; - object.target = null; - object.covered = false; - object.index = 0; + object.sessionParameters = null; + object.diagnosticInfo = null; + object.triggeredIntent = null; + object.currentPage = null; + object.status = null; } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRoute.toObject(message.transitionRoute, options); - if (options.oneofs) - object.detail = "transitionRoute"; + 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.v3beta1.TestRunDifference.toObject(message.differences[j], options); } - if (message.eventHandler != null && message.hasOwnProperty("eventHandler")) { - object.eventHandler = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.toObject(message.eventHandler, options); - if (options.oneofs) - object.detail = "eventHandler"; + 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.v3beta1.Intent.toObject(message.triggeredIntent, options); + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; }; /** - * Converts this Transition to JSON. + * Converts this VirtualAgentOutput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @instance * @returns {Object.} JSON object */ - Transition.prototype.toJSON = function toJSON() { + VirtualAgentOutput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Transition + * Gets the default type url for VirtualAgentOutput * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @memberof google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Transition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VirtualAgentOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ConversationTurn.VirtualAgentOutput"; }; - return Transition; + return VirtualAgentOutput; })(); - return TransitionCoverage; + return ConversationTurn; })(); - v3beta1.TransitionRouteGroupCoverage = (function() { + v3beta1.TestRunDifference = (function() { /** - * Properties of a TransitionRouteGroupCoverage. + * Properties of a TestRunDifference. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ITransitionRouteGroupCoverage - * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages - * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore + * @interface ITestRunDifference + * @property {google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType|null} [type] TestRunDifference type + * @property {string|null} [description] TestRunDifference description */ /** - * Constructs a new TransitionRouteGroupCoverage. + * Constructs a new TestRunDifference. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a TransitionRouteGroupCoverage. - * @implements ITransitionRouteGroupCoverage + * @classdesc Represents a TestRunDifference. + * @implements ITestRunDifference * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference=} [properties] Properties to set */ - function TransitionRouteGroupCoverage(properties) { - this.coverages = []; + function TestRunDifference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118911,92 +123318,89 @@ } /** - * TransitionRouteGroupCoverage coverages. - * @member {Array.} coverages - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * TestRunDifference type. + * @member {google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType} type + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @instance */ - TransitionRouteGroupCoverage.prototype.coverages = $util.emptyArray; + TestRunDifference.prototype.type = 0; /** - * TransitionRouteGroupCoverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * TestRunDifference description. + * @member {string} description + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @instance */ - TransitionRouteGroupCoverage.prototype.coverageScore = 0; + TestRunDifference.prototype.description = ""; /** - * Creates a new TransitionRouteGroupCoverage instance using the specified properties. + * Creates a new TestRunDifference instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference instance */ - TransitionRouteGroupCoverage.create = function create(properties) { - return new TransitionRouteGroupCoverage(properties); + TestRunDifference.create = function create(properties) { + return new TestRunDifference(properties); }; /** - * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * Encodes the specified TestRunDifference message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestRunDifference.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference} message TestRunDifference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroupCoverage.encode = function encode(message, writer) { + TestRunDifference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.coverages != null && message.coverages.length) - for (var i = 0; i < message.coverages.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.encode(message.coverages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.coverageScore); + 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 TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. + * Encodes the specified TestRunDifference message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TestRunDifference.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITestRunDifference} message TestRunDifference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { + TestRunDifference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. + * Decodes a TestRunDifference message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference * @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) { + TestRunDifference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.coverages && message.coverages.length)) - message.coverages = []; - message.coverages.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.decode(reader, reader.uint32())); + message.type = reader.int32(); break; } case 2: { - message.coverageScore = reader.float(); + message.description = reader.string(); break; } default: @@ -119008,748 +123412,283 @@ }; /** - * Decodes a TransitionRouteGroupCoverage 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.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference * @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) { + TestRunDifference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransitionRouteGroupCoverage message. + * Verifies a TestRunDifference message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @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) { + TestRunDifference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.coverages != null && message.hasOwnProperty("coverages")) { - if (!Array.isArray(message.coverages)) - return "coverages: array expected"; - for (var i = 0; i < message.coverages.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify(message.coverages[i]); - if (error) - return "coverages." + error; + if (message.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.coverageScore != null && message.hasOwnProperty("coverageScore")) - if (typeof message.coverageScore !== "number") - return "coverageScore: number expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a TransitionRouteGroupCoverage 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.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} TestRunDifference */ - TransitionRouteGroupCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) + TestRunDifference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); - if (object.coverages) { - if (!Array.isArray(object.coverages)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: array expected"); - message.coverages = []; - for (var i = 0; i < object.coverages.length; ++i) { - if (typeof object.coverages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: object expected"); - message.coverages[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.fromObject(object.coverages[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.coverageScore != null) - message.coverageScore = Number(object.coverageScore); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a TransitionRouteGroupCoverage 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.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage + * @param {google.cloud.dialogflow.cx.v3beta1.TestRunDifference} message TestRunDifference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransitionRouteGroupCoverage.toObject = function toObject(message, options) { + TestRunDifference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.coverages = []; - if (options.defaults) - object.coverageScore = 0; - if (message.coverages && message.coverages.length) { - object.coverages = []; - for (var j = 0; j < message.coverages.length; ++j) - object.coverages[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.toObject(message.coverages[j], options); + if (options.defaults) { + object.type = options.enums === String ? "DIFF_TYPE_UNSPECIFIED" : 0; + object.description = ""; } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] : message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this TransitionRouteGroupCoverage to JSON. + * Converts this TestRunDifference to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @instance * @returns {Object.} JSON object */ - TransitionRouteGroupCoverage.prototype.toJSON = function toJSON() { + TestRunDifference.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 TestRunDifference * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TestRunDifference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransitionRouteGroupCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TestRunDifference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TestRunDifference"; }; - TransitionRouteGroupCoverage.Coverage = (function() { + /** + * DiffType enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; + })(); - /** - * Properties of a Coverage. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage - * @interface ICoverage - * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null} [routeGroup] Coverage routeGroup - * @property {Array.|null} [transitions] Coverage transitions - * @property {number|null} [coverageScore] Coverage coverageScore - */ + return TestRunDifference; + })(); - /** - * Constructs a new Coverage. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage - * @classdesc Represents a Coverage. - * @implements ICoverage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set - */ - function Coverage(properties) { - this.transitions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3beta1.TransitionCoverage = (function() { - /** - * Coverage routeGroup. - * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null|undefined} routeGroup - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @instance - */ - Coverage.prototype.routeGroup = null; + /** + * Properties of a TransitionCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ITransitionCoverage + * @property {Array.|null} [transitions] TransitionCoverage transitions + * @property {number|null} [coverageScore] TransitionCoverage coverageScore + */ - /** - * Coverage transitions. - * @member {Array.} transitions - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @instance - */ - Coverage.prototype.transitions = $util.emptyArray; + /** + * Constructs a new TransitionCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a TransitionCoverage. + * @implements ITransitionCoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage=} [properties] Properties to set + */ + function TransitionCoverage(properties) { + this.transitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Coverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @instance - */ - Coverage.prototype.coverageScore = 0; + /** + * TransitionCoverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @instance + */ + TransitionCoverage.prototype.transitions = $util.emptyArray; - /** - * Creates a new Coverage instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage instance - */ - Coverage.create = function create(properties) { - return new Coverage(properties); - }; + /** + * TransitionCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @instance + */ + TransitionCoverage.prototype.coverageScore = 0; - /** - * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Coverage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.routeGroup != null && Object.hasOwnProperty.call(message, "routeGroup")) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.encode(message.routeGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.transitions != null && message.transitions.length) - for (var i = 0; i < message.transitions.length; ++i) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.encode(message.transitions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.coverageScore); - return writer; - }; + /** + * Creates a new TransitionCoverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage instance + */ + TransitionCoverage.create = function create(properties) { + return new TransitionCoverage(properties); + }; - /** - * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Coverage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Coverage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Coverage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.transitions && message.transitions.length)) - message.transitions = []; - message.transitions.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.decode(reader, reader.uint32())); - break; - } - case 3: { - message.coverageScore = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Coverage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Coverage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Coverage message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Coverage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.verify(message.routeGroup); - if (error) - return "routeGroup." + error; - } - if (message.transitions != null && message.hasOwnProperty("transitions")) { - if (!Array.isArray(message.transitions)) - return "transitions: array expected"; - for (var i = 0; i < message.transitions.length; ++i) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify(message.transitions[i]); - if (error) - return "transitions." + error; - } - } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - if (typeof message.coverageScore !== "number") - return "coverageScore: number expected"; - return null; - }; - - /** - * Creates a Coverage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage - */ - Coverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); - if (object.routeGroup != null) { - if (typeof object.routeGroup !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.routeGroup: object expected"); - message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.fromObject(object.routeGroup); - } - if (object.transitions) { - if (!Array.isArray(object.transitions)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: array expected"); - message.transitions = []; - for (var i = 0; i < object.transitions.length; ++i) { - if (typeof object.transitions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: object expected"); - message.transitions[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.fromObject(object.transitions[i]); - } - } - if (object.coverageScore != null) - message.coverageScore = Number(object.coverageScore); - return message; - }; - - /** - * Creates a plain object from a Coverage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} message Coverage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Coverage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.transitions = []; - if (options.defaults) { - object.routeGroup = null; - object.coverageScore = 0; - } - if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) - object.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.toObject(message.routeGroup, options); - if (message.transitions && message.transitions.length) { - object.transitions = []; - for (var j = 0; j < message.transitions.length; ++j) - object.transitions[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.toObject(message.transitions[j], options); - } - if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) - object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; - return object; - }; - - /** - * Converts this Coverage to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @instance - * @returns {Object.} JSON object - */ - Coverage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Coverage - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.Coverage"; - }; - - Coverage.Transition = (function() { - - /** - * Properties of a Transition. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @interface ITransition - * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null} [transitionRoute] Transition transitionRoute - * @property {boolean|null} [covered] Transition covered - */ - - /** - * Constructs a new Transition. - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage - * @classdesc Represents a Transition. - * @implements ITransition - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set - */ - function Transition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Transition transitionRoute. - * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null|undefined} transitionRoute - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @instance - */ - Transition.prototype.transitionRoute = null; - - /** - * Transition covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @instance - */ - Transition.prototype.covered = false; - - /** - * Creates a new Transition instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition instance - */ - Transition.create = function create(properties) { - return new Transition(properties); - }; - - /** - * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); - return writer; - }; - - /** - * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Transition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32()); - break; - } - case 2: { - message.covered = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Transition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Transition message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Transition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoute); - if (error) - return "transitionRoute." + error; - } - if (message.covered != null && message.hasOwnProperty("covered")) - if (typeof message.covered !== "boolean") - return "covered: boolean expected"; - return null; - }; - - /** - * Creates a Transition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition - */ - Transition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); - if (object.transitionRoute != null) { - if (typeof object.transitionRoute !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.transitionRoute: object expected"); - message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoute); - } - if (object.covered != null) - message.covered = Boolean(object.covered); - return message; - }; - - /** - * Creates a plain object from a Transition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} message Transition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Transition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.transitionRoute = null; - object.covered = false; - } - if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) - object.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoute, options); - if (message.covered != null && message.hasOwnProperty("covered")) - object.covered = message.covered; - return object; - }; - - /** - * Converts this Transition to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition - * @instance - * @returns {Object.} JSON object - */ - Transition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Transition - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition"; - }; - - return Transition; - })(); - - return Coverage; - })(); - - return TransitionRouteGroupCoverage; - })(); - - v3beta1.IntentCoverage = (function() { - - /** - * Properties of an IntentCoverage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IIntentCoverage - * @property {Array.|null} [intents] IntentCoverage intents - * @property {number|null} [coverageScore] IntentCoverage coverageScore - */ - - /** - * Constructs a new IntentCoverage. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an IntentCoverage. - * @implements IIntentCoverage - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage=} [properties] Properties to set - */ - function IntentCoverage(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]]; - } - - /** - * IntentCoverage intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @instance - */ - IntentCoverage.prototype.intents = $util.emptyArray; - - /** - * IntentCoverage coverageScore. - * @member {number} coverageScore - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @instance - */ - IntentCoverage.prototype.coverageScore = 0; - - /** - * Creates a new IntentCoverage instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage instance - */ - IntentCoverage.create = function create(properties) { - return new IntentCoverage(properties); - }; - - /** - * Encodes the specified IntentCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage} message IntentCoverage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntentCoverage.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.v3beta1.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 TransitionCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage} message TransitionCoverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransitionCoverage.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.v3beta1.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 IntentCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.verify|verify} messages. + * Encodes the specified TransitionCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage} message IntentCoverage message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage} message TransitionCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentCoverage.encodeDelimited = function encodeDelimited(message, writer) { + TransitionCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentCoverage message from the specified reader or buffer. + * Decodes a TransitionCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage * @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) { + TransitionCoverage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push($root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.decode(reader, reader.uint32())); + if (!(message.transitions && message.transitions.length)) + message.transitions = []; + message.transitions.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.decode(reader, reader.uint32())); break; } case 2: { @@ -119765,39 +123704,39 @@ }; /** - * Decodes an IntentCoverage 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.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage * @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) { + TransitionCoverage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentCoverage message. + * Verifies a TransitionCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @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) { + TransitionCoverage.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.v3beta1.IntentCoverage.Intent.verify(message.intents[i]); + if (message.transitions != null && message.hasOwnProperty("transitions")) { + if (!Array.isArray(message.transitions)) + return "transitions: array expected"; + for (var i = 0; i < message.transitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.verify(message.transitions[i]); if (error) - return "intents." + error; + return "transitions." + error; } } if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) @@ -119807,25 +123746,25 @@ }; /** - * Creates an IntentCoverage 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.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} TransitionCoverage */ - IntentCoverage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) + TransitionCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.fromObject(object.intents[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage(); + if (object.transitions) { + if (!Array.isArray(object.transitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.transitions: object expected"); + message.transitions[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.fromObject(object.transitions[i]); } } if (object.coverageScore != null) @@ -119834,26 +123773,26 @@ }; /** - * Creates a plain object from an IntentCoverage 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.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} message IntentCoverage + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage} message TransitionCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IntentCoverage.toObject = function toObject(message, options) { + TransitionCoverage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.intents = []; + object.transitions = []; 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.v3beta1.IntentCoverage.Intent.toObject(message.intents[j], options); + if (message.transitions && message.transitions.length) { + object.transitions = []; + for (var j = 0; j < message.transitions.length; ++j) + object.transitions[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.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; @@ -119861,50 +123800,50 @@ }; /** - * Converts this IntentCoverage to JSON. + * Converts this TransitionCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @instance * @returns {Object.} JSON object */ - IntentCoverage.prototype.toJSON = function toJSON() { + TransitionCoverage.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 TransitionCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IntentCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.IntentCoverage"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionCoverage"; }; - IntentCoverage.Intent = (function() { + TransitionCoverage.TransitionNode = (function() { /** - * Properties of an Intent. - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @interface IIntent - * @property {string|null} [intent] Intent intent - * @property {boolean|null} [covered] Intent covered + * Properties of a TransitionNode. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @interface ITransitionNode + * @property {google.cloud.dialogflow.cx.v3beta1.IPage|null} [page] TransitionNode page + * @property {google.cloud.dialogflow.cx.v3beta1.IFlow|null} [flow] TransitionNode flow */ /** - * Constructs a new Intent. - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage - * @classdesc Represents an Intent. - * @implements IIntent + * Constructs a new TransitionNode. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @classdesc Represents a TransitionNode. + * @implements ITransitionNode * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IIntent=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode=} [properties] Properties to set */ - function Intent(properties) { + function TransitionNode(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119912,89 +123851,103 @@ } /** - * Intent intent. - * @member {string} intent - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * TransitionNode page. + * @member {google.cloud.dialogflow.cx.v3beta1.IPage|null|undefined} page + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @instance */ - Intent.prototype.intent = ""; + TransitionNode.prototype.page = null; /** - * Intent covered. - * @member {boolean} covered - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * TransitionNode flow. + * @member {google.cloud.dialogflow.cx.v3beta1.IFlow|null|undefined} flow + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @instance */ - Intent.prototype.covered = false; + TransitionNode.prototype.flow = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new Intent instance using the specified properties. + * TransitionNode kind. + * @member {"page"|"flow"|undefined} kind + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode + * @instance + */ + Object.defineProperty(TransitionNode.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["page", "flow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransitionNode instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IIntent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} Intent instance + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode instance */ - Intent.create = function create(properties) { - return new Intent(properties); + TransitionNode.create = function create(properties) { + return new TransitionNode(properties); }; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.verify|verify} messages. + * Encodes the specified TransitionNode message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encode = function encode(message, writer) { + TransitionNode.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); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Flow.encode(message.flow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.verify|verify} messages. + * Encodes the specified TransitionNode message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IIntent} message Intent message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode} message TransitionNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { + TransitionNode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes a TransitionNode message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode * @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) { + TransitionNode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.intent = reader.string(); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.decode(reader, reader.uint32()); break; } case 2: { - message.covered = reader.bool(); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.decode(reader, reader.uint32()); break; } default: @@ -120006,732 +123959,523 @@ }; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes a TransitionNode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode * @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) { + TransitionNode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Intent message. + * Verifies a TransitionNode message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @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) { + TransitionNode.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"; + var properties = {}; + if (message.page != null && message.hasOwnProperty("page")) { + properties.kind = 1; + { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Flow.verify(message.flow); + if (error) + return "flow." + error; + } + } return null; }; /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * Creates a TransitionNode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} Intent + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} TransitionNode */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + TransitionNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent(); - if (object.intent != null) - message.intent = String(object.intent); - if (object.covered != null) - message.covered = Boolean(object.covered); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode(); + if (object.page != null) { + if (typeof object.page !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.page: object expected"); + message.page = $root.google.cloud.dialogflow.cx.v3beta1.Page.fromObject(object.page); + } + if (object.flow != null) { + if (typeof object.flow !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.flow: object expected"); + message.flow = $root.google.cloud.dialogflow.cx.v3beta1.Flow.fromObject(object.flow); + } return message; }; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. + * Creates a plain object from a TransitionNode message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} message Intent + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode} message TransitionNode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Intent.toObject = function toObject(message, options) { + TransitionNode.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = ""; - object.covered = false; + if (message.page != null && message.hasOwnProperty("page")) { + object.page = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Flow.toObject(message.flow, options); + if (options.oneofs) + object.kind = "flow"; } - 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. + * Converts this TransitionNode to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @instance * @returns {Object.} JSON object */ - Intent.prototype.toJSON = function toJSON() { + TransitionNode.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 TransitionNode * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode"; }; - return Intent; + return TransitionNode; })(); - return IntentCoverage; - })(); + TransitionCoverage.Transition = (function() { - v3beta1.CalculateCoverageRequest = (function() { + /** + * Properties of a Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @interface ITransition + * @property {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null} [source] Transition source + * @property {number|null} [index] Transition index + * @property {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null} [target] Transition target + * @property {boolean|null} [covered] Transition covered + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null} [transitionRoute] Transition transitionRoute + * @property {google.cloud.dialogflow.cx.v3beta1.IEventHandler|null} [eventHandler] Transition eventHandler + */ - /** - * Properties of a CalculateCoverageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICalculateCoverageRequest - * @property {string|null} [agent] CalculateCoverageRequest agent - * @property {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType|null} [type] CalculateCoverageRequest type - */ + /** + * Constructs a new Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage + * @classdesc Represents a Transition. + * @implements ITransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - /** - * Constructs a new CalculateCoverageRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CalculateCoverageRequest. - * @implements ICalculateCoverageRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest=} [properties] Properties to set - */ - function CalculateCoverageRequest(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 source. + * @member {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null|undefined} source + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.source = null; - /** - * CalculateCoverageRequest agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @instance - */ - CalculateCoverageRequest.prototype.agent = ""; + /** + * Transition index. + * @member {number} index + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.index = 0; - /** - * CalculateCoverageRequest type. - * @member {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType} type - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @instance - */ - CalculateCoverageRequest.prototype.type = 0; + /** + * Transition target. + * @member {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransitionNode|null|undefined} target + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.target = null; - /** - * Creates a new CalculateCoverageRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest instance - */ - CalculateCoverageRequest.create = function create(properties) { - return new CalculateCoverageRequest(properties); - }; + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.covered = false; - /** - * Encodes the specified CalculateCoverageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateCoverageRequest.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); - return writer; - }; + /** + * Transition transitionRoute. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null|undefined} transitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.transitionRoute = null; - /** - * Encodes the specified CalculateCoverageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateCoverageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Transition eventHandler. + * @member {google.cloud.dialogflow.cx.v3beta1.IEventHandler|null|undefined} eventHandler + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Transition.prototype.eventHandler = null; - /** - * Decodes a CalculateCoverageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.agent = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a CalculateCoverageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Transition detail. + * @member {"transitionRoute"|"eventHandler"|undefined} detail + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + */ + Object.defineProperty(Transition.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["transitionRoute", "eventHandler"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies a CalculateCoverageRequest message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @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) { - 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) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * Creates a new Transition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.ITransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} Transition instance + */ + Transition.create = function create(properties) { + return new Transition(properties); + }; - /** - * Creates a CalculateCoverageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest - */ - CalculateCoverageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 CalculateCoverageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} message CalculateCoverageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CalculateCoverageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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.v3beta1.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType[message.type] : message.type; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; - return object; - }; - - /** - * Converts this CalculateCoverageRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @instance - * @returns {Object.} JSON object - */ - CalculateCoverageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CalculateCoverageRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CalculateCoverageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest"; - }; - - /** - * CoverageType enum. - * @name google.cloud.dialogflow.cx.v3beta1.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; - })(); - - v3beta1.CalculateCoverageResponse = (function() { - - /** - * Properties of a CalculateCoverageResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICalculateCoverageResponse - * @property {string|null} [agent] CalculateCoverageResponse agent - * @property {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage|null} [intentCoverage] CalculateCoverageResponse intentCoverage - * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null} [transitionCoverage] CalculateCoverageResponse transitionCoverage - * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null} [routeGroupCoverage] CalculateCoverageResponse routeGroupCoverage - */ - - /** - * Constructs a new CalculateCoverageResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CalculateCoverageResponse. - * @implements ICalculateCoverageResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse=} [properties] Properties to set - */ - function CalculateCoverageResponse(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]]; - } - - /** - * CalculateCoverageResponse agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.agent = ""; - - /** - * CalculateCoverageResponse intentCoverage. - * @member {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage|null|undefined} intentCoverage - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.intentCoverage = null; - - /** - * CalculateCoverageResponse transitionCoverage. - * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null|undefined} transitionCoverage - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.transitionCoverage = null; - - /** - * CalculateCoverageResponse routeGroupCoverage. - * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null|undefined} routeGroupCoverage - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @instance - */ - CalculateCoverageResponse.prototype.routeGroupCoverage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CalculateCoverageResponse coverageType. - * @member {"intentCoverage"|"transitionCoverage"|"routeGroupCoverage"|undefined} coverageType - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse instance - */ - CalculateCoverageResponse.create = function create(properties) { - return new CalculateCoverageResponse(properties); - }; - - /** - * Encodes the specified CalculateCoverageResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateCoverageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intentCoverage != null && Object.hasOwnProperty.call(message, "intentCoverage")) - $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.encode(message.transitionCoverage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.agent); - if (message.routeGroupCoverage != null && Object.hasOwnProperty.call(message, "routeGroupCoverage")) - $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.encode(message.routeGroupCoverage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.EventHandler.encode(message.eventHandler, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified CalculateCoverageResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CalculateCoverageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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 CalculateCoverageResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.agent = reader.string(); - break; - } - case 2: { - message.intentCoverage = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.decode(reader, reader.uint32()); - break; - } - case 4: { - message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.decode(reader, reader.uint32()); - break; - } - case 6: { - message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.decode(reader, reader.uint32()); + /** + * Decodes a Transition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + break; + } + case 4: { + message.index = reader.int32(); + break; + } + case 2: { + message.target = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.TransitionNode.decode(reader, reader.uint32()); + break; + } + case 3: { + message.covered = reader.bool(); + break; + } + case 5: { + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32()); + break; + } + case 6: { + message.eventHandler = $root.google.cloud.dialogflow.cx.v3beta1.EventHandler.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a CalculateCoverageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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 CalculateCoverageResponse message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @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) { - 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.v3beta1.IntentCoverage.verify(message.intentCoverage); + /** + * Verifies a Transition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.TransitionNode.verify(message.source); if (error) - return "intentCoverage." + error; + return "source." + 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.v3beta1.TransitionCoverage.verify(message.transitionCoverage); + 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.v3beta1.TransitionCoverage.TransitionNode.verify(message.target); if (error) - return "transitionCoverage." + error; + return "target." + error; } - } - if (message.routeGroupCoverage != null && message.hasOwnProperty("routeGroupCoverage")) { - if (properties.coverageType === 1) - return "coverageType: multiple values"; - properties.coverageType = 1; - { - var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify(message.routeGroupCoverage); - if (error) - return "routeGroupCoverage." + error; + 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.v3beta1.TransitionRoute.verify(message.transitionRoute); + if (error) + return "transitionRoute." + error; + } } - } - return null; - }; + 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.v3beta1.EventHandler.verify(message.eventHandler); + if (error) + return "eventHandler." + error; + } + } + return null; + }; - /** - * Creates a CalculateCoverageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse - */ - CalculateCoverageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition} Transition + */ + Transition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.source: object expected"); + message.source = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.Transition.target: object expected"); + message.target = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.Transition.transitionRoute: object expected"); + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoute); + } + if (object.eventHandler != null) { + if (typeof object.eventHandler !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition.eventHandler: object expected"); + message.eventHandler = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.TransitionNode.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.EventHandler.toObject(message.eventHandler, options); + if (options.oneofs) + object.detail = "eventHandler"; + } return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageResponse.intentCoverage: object expected"); - message.intentCoverage = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.fromObject(object.intentCoverage); - } - if (object.transitionCoverage != null) { - if (typeof object.transitionCoverage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.transitionCoverage: object expected"); - message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.fromObject(object.transitionCoverage); - } - if (object.routeGroupCoverage != null) { - if (typeof object.routeGroupCoverage !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.routeGroupCoverage: object expected"); - message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.fromObject(object.routeGroupCoverage); - } - return message; - }; + }; - /** - * Creates a plain object from a CalculateCoverageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} message CalculateCoverageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CalculateCoverageResponse.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.v3beta1.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.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.toObject(message.routeGroupCoverage, options); - if (options.oneofs) - object.coverageType = "routeGroupCoverage"; - } - return object; - }; + /** + * Converts this Transition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.Transition + * @instance + * @returns {Object.} JSON object + */ + Transition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CalculateCoverageResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @instance - * @returns {Object.} JSON object - */ - CalculateCoverageResponse.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.v3beta1.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.v3beta1.TransitionCoverage.Transition"; + }; - /** - * Gets the default type url for CalculateCoverageResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CalculateCoverageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse"; - }; + return Transition; + })(); - return CalculateCoverageResponse; + return TransitionCoverage; })(); - v3beta1.ListTestCasesRequest = (function() { + v3beta1.TransitionRouteGroupCoverage = (function() { /** - * Properties of a ListTestCasesRequest. + * Properties of a TransitionRouteGroupCoverage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1.ListTestCasesRequest.TestCaseView|null} [view] ListTestCasesRequest view + * @interface ITransitionRouteGroupCoverage + * @property {Array.|null} [coverages] TransitionRouteGroupCoverage coverages + * @property {number|null} [coverageScore] TransitionRouteGroupCoverage coverageScore */ /** - * Constructs a new ListTestCasesRequest. + * Constructs a new TransitionRouteGroupCoverage. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListTestCasesRequest. - * @implements IListTestCasesRequest + * @classdesc Represents a TransitionRouteGroupCoverage. + * @implements ITransitionRouteGroupCoverage * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set */ - function ListTestCasesRequest(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) @@ -120739,117 +124483,92 @@ } /** - * ListTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest - * @instance - */ - ListTestCasesRequest.prototype.parent = ""; - - /** - * ListTestCasesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest - * @instance - */ - ListTestCasesRequest.prototype.pageSize = 0; - - /** - * ListTestCasesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * TransitionRouteGroupCoverage coverages. + * @member {Array.} coverages + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @instance */ - ListTestCasesRequest.prototype.pageToken = ""; + TransitionRouteGroupCoverage.prototype.coverages = $util.emptyArray; /** - * ListTestCasesRequest view. - * @member {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} view - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * TransitionRouteGroupCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @instance */ - ListTestCasesRequest.prototype.view = 0; + TransitionRouteGroupCoverage.prototype.coverageScore = 0; /** - * Creates a new ListTestCasesRequest instance using the specified properties. + * Creates a new TransitionRouteGroupCoverage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage instance */ - ListTestCasesRequest.create = function create(properties) { - return new ListTestCasesRequest(properties); + TransitionRouteGroupCoverage.create = function create(properties) { + return new TransitionRouteGroupCoverage(properties); }; /** - * Encodes the specified ListTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.verify|verify} messages. + * Encodes the specified TransitionRouteGroupCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesRequest.encode = function encode(message, writer) { + TransitionRouteGroupCoverage.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.coverages != null && message.coverages.length) + for (var i = 0; i < message.coverages.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.encode(message.coverages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.coverageScore); return writer; }; /** - * Encodes the specified ListTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.verify|verify} messages. + * Encodes the specified TransitionRouteGroupCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage} message TransitionRouteGroupCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + TransitionRouteGroupCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTestCasesRequest message from the specified reader or buffer. + * Decodes a TransitionRouteGroupCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCasesRequest.decode = function decode(reader, length) { + TransitionRouteGroupCoverage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.coverages && message.coverages.length)) + message.coverages = []; + message.coverages.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.view = reader.int32(); + message.coverageScore = reader.float(); break; } default: @@ -120861,282 +124580,752 @@ }; /** - * Decodes a ListTestCasesRequest 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.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTestCasesRequest.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 ListTestCasesRequest message. + * Verifies a TransitionRouteGroupCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTestCasesRequest.verify = function verify(message) { + TransitionRouteGroupCoverage.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.coverages != null && message.hasOwnProperty("coverages")) { + if (!Array.isArray(message.coverages)) + return "coverages: array expected"; + for (var i = 0; i < message.coverages.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify(message.coverages[i]); + if (error) + return "coverages." + error; } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; return null; }; /** - * Creates a ListTestCasesRequest 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.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} TransitionRouteGroupCoverage */ - ListTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) + TransitionRouteGroupCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage(); + if (object.coverages) { + if (!Array.isArray(object.coverages)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: array expected"); + message.coverages = []; + for (var i = 0; i < object.coverages.length; ++i) { + if (typeof object.coverages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.coverages: object expected"); + message.coverages[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.fromObject(object.coverages[i]); } - 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; } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); return message; }; /** - * Creates a plain object from a ListTestCasesRequest 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.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} message ListTestCasesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage} message TransitionRouteGroupCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTestCasesRequest.toObject = function toObject(message, options) { + TransitionRouteGroupCoverage.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; + if (options.arrays || options.defaults) + object.coverages = []; + if (options.defaults) + object.coverageScore = 0; + if (message.coverages && message.coverages.length) { + object.coverages = []; + for (var j = 0; j < message.coverages.length; ++j) + object.coverages[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.toObject(message.coverages[j], options); } - if (message.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.v3beta1.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView[message.view] : message.view; + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; return object; }; /** - * Converts this ListTestCasesRequest to JSON. + * Converts this TransitionRouteGroupCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @instance * @returns {Object.} JSON object */ - ListTestCasesRequest.prototype.toJSON = function toJSON() { + TransitionRouteGroupCoverage.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 TransitionRouteGroupCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransitionRouteGroupCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage"; }; - /** - * TestCaseView enum. - * @name google.cloud.dialogflow.cx.v3beta1.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; - })(); + TransitionRouteGroupCoverage.Coverage = (function() { - v3beta1.ListTestCasesResponse = (function() { + /** + * Properties of a Coverage. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @interface ICoverage + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null} [routeGroup] Coverage routeGroup + * @property {Array.|null} [transitions] Coverage transitions + * @property {number|null} [coverageScore] Coverage coverageScore + */ - /** - * Properties of a ListTestCasesResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListTestCasesResponse - * @property {Array.|null} [testCases] ListTestCasesResponse testCases - * @property {string|null} [nextPageToken] ListTestCasesResponse nextPageToken - */ + /** + * Constructs a new Coverage. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage + * @classdesc Represents a Coverage. + * @implements ICoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + */ + function Coverage(properties) { + this.transitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListTestCasesResponse. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListTestCasesResponse. - * @implements IListTestCasesResponse - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * Coverage routeGroup. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroup|null|undefined} routeGroup + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.routeGroup = null; - /** - * ListTestCasesResponse testCases. - * @member {Array.} testCases - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse - * @instance - */ - ListTestCasesResponse.prototype.testCases = $util.emptyArray; + /** + * Coverage transitions. + * @member {Array.} transitions + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.transitions = $util.emptyArray; - /** - * ListTestCasesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse - * @instance - */ - ListTestCasesResponse.prototype.nextPageToken = ""; + /** + * Coverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + */ + Coverage.prototype.coverageScore = 0; - /** - * Creates a new ListTestCasesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse instance - */ - ListTestCasesResponse.create = function create(properties) { - return new ListTestCasesResponse(properties); - }; + /** + * Creates a new Coverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage instance + */ + Coverage.create = function create(properties) { + return new Coverage(properties); + }; - /** - * Encodes the specified ListTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.verify|verify} messages. + /** + * Encodes the specified Coverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.routeGroup != null && Object.hasOwnProperty.call(message, "routeGroup")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.encode(message.routeGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.transitions != null && message.transitions.length) + for (var i = 0; i < message.transitions.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.encode(message.transitions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.coverageScore != null && Object.hasOwnProperty.call(message, "coverageScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.coverageScore); + return writer; + }; + + /** + * Encodes the specified Coverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.ICoverage} message Coverage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coverage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coverage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.transitions && message.transitions.length)) + message.transitions = []; + message.transitions.push($root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.decode(reader, reader.uint32())); + break; + } + case 3: { + message.coverageScore = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coverage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coverage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coverage message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coverage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.verify(message.routeGroup); + if (error) + return "routeGroup." + error; + } + if (message.transitions != null && message.hasOwnProperty("transitions")) { + if (!Array.isArray(message.transitions)) + return "transitions: array expected"; + for (var i = 0; i < message.transitions.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify(message.transitions[i]); + if (error) + return "transitions." + error; + } + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; + return null; + }; + + /** + * Creates a Coverage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} Coverage + */ + Coverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage(); + if (object.routeGroup != null) { + if (typeof object.routeGroup !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.routeGroup: object expected"); + message.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.fromObject(object.routeGroup); + } + if (object.transitions) { + if (!Array.isArray(object.transitions)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: array expected"); + message.transitions = []; + for (var i = 0; i < object.transitions.length; ++i) { + if (typeof object.transitions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.transitions: object expected"); + message.transitions[i] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.fromObject(object.transitions[i]); + } + } + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); + return message; + }; + + /** + * Creates a plain object from a Coverage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage} message Coverage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coverage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transitions = []; + if (options.defaults) { + object.routeGroup = null; + object.coverageScore = 0; + } + if (message.routeGroup != null && message.hasOwnProperty("routeGroup")) + object.routeGroup = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup.toObject(message.routeGroup, options); + if (message.transitions && message.transitions.length) { + object.transitions = []; + for (var j = 0; j < message.transitions.length; ++j) + object.transitions[j] = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.toObject(message.transitions[j], options); + } + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; + return object; + }; + + /** + * Converts this Coverage to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @instance + * @returns {Object.} JSON object + */ + Coverage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Coverage + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.Coverage"; + }; + + Coverage.Transition = (function() { + + /** + * Properties of a Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @interface ITransition + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null} [transitionRoute] Transition transitionRoute + * @property {boolean|null} [covered] Transition covered + */ + + /** + * Constructs a new Transition. + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage + * @classdesc Represents a Transition. + * @implements ITransition + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + */ + function Transition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Transition transitionRoute. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRoute|null|undefined} transitionRoute + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.transitionRoute = null; + + /** + * Transition covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + */ + Transition.prototype.covered = false; + + /** + * Creates a new Transition instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition instance + */ + Transition.create = function create(properties) { + return new Transition(properties); + }; + + /** + * Encodes the specified Transition message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transitionRoute != null && Object.hasOwnProperty.call(message, "transitionRoute")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.encode(message.transitionRoute, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.covered != null && Object.hasOwnProperty.call(message, "covered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.covered); + return writer; + }; + + /** + * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.ITransition} message Transition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.decode(reader, reader.uint32()); + break; + } + case 2: { + message.covered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transition message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.verify(message.transitionRoute); + if (error) + return "transitionRoute." + error; + } + if (message.covered != null && message.hasOwnProperty("covered")) + if (typeof message.covered !== "boolean") + return "covered: boolean expected"; + return null; + }; + + /** + * Creates a Transition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} Transition + */ + Transition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition(); + if (object.transitionRoute != null) { + if (typeof object.transitionRoute !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition.transitionRoute: object expected"); + message.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.fromObject(object.transitionRoute); + } + if (object.covered != null) + message.covered = Boolean(object.covered); + return message; + }; + + /** + * Creates a plain object from a Transition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition} message Transition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.transitionRoute = null; + object.covered = false; + } + if (message.transitionRoute != null && message.hasOwnProperty("transitionRoute")) + object.transitionRoute = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.toObject(message.transitionRoute, options); + if (message.covered != null && message.hasOwnProperty("covered")) + object.covered = message.covered; + return object; + }; + + /** + * Converts this Transition to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition + * @instance + * @returns {Object.} JSON object + */ + Transition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Transition + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.Coverage.Transition"; + }; + + return Transition; + })(); + + return Coverage; + })(); + + return TransitionRouteGroupCoverage; + })(); + + v3beta1.IntentCoverage = (function() { + + /** + * Properties of an IntentCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IIntentCoverage + * @property {Array.|null} [intents] IntentCoverage intents + * @property {number|null} [coverageScore] IntentCoverage coverageScore + */ + + /** + * Constructs a new IntentCoverage. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an IntentCoverage. + * @implements IIntentCoverage + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage=} [properties] Properties to set + */ + function IntentCoverage(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]]; + } + + /** + * IntentCoverage intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @instance + */ + IntentCoverage.prototype.intents = $util.emptyArray; + + /** + * IntentCoverage coverageScore. + * @member {number} coverageScore + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @instance + */ + IntentCoverage.prototype.coverageScore = 0; + + /** + * Creates a new IntentCoverage instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage instance + */ + IntentCoverage.create = function create(properties) { + return new IntentCoverage(properties); + }; + + /** + * Encodes the specified IntentCoverage message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage} message IntentCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesResponse.encode = function encode(message, writer) { + IntentCoverage.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.v3beta1.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); + if (message.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 ListTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.verify|verify} messages. + * Encodes the specified IntentCoverage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.IntentCoverage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage} message IntentCoverage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + IntentCoverage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTestCasesResponse message from the specified reader or buffer. + * Decodes an IntentCoverage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesResponse} ListTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage * @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) { + IntentCoverage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.testCases && message.testCases.length)) - message.testCases = []; - message.testCases.push($root.google.cloud.dialogflow.cx.v3beta1.TestCase.decode(reader, reader.uint32())); + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push($root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.decode(reader, reader.uint32())); break; } case 2: { - message.nextPageToken = reader.string(); + message.coverageScore = reader.float(); break; } default: @@ -121148,150 +125337,376 @@ }; /** - * Decodes a ListTestCasesResponse 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.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage * @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) { + IntentCoverage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTestCasesResponse message. + * Verifies an IntentCoverage message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @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) { + IntentCoverage.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.v3beta1.TestCase.verify(message.testCases[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.v3beta1.IntentCoverage.Intent.verify(message.intents[i]); if (error) - return "testCases." + error; + return "intents." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + if (typeof message.coverageScore !== "number") + return "coverageScore: number expected"; return null; }; /** - * Creates a ListTestCasesResponse 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.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} IntentCoverage */ - ListTestCasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) + IntentCoverage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(); - if (object.testCases) { - if (!Array.isArray(object.testCases)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesResponse.testCases: object expected"); - message.testCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCases[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent.fromObject(object.intents[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.coverageScore != null) + message.coverageScore = Number(object.coverageScore); return message; }; /** - * Creates a plain object from a ListTestCasesResponse 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.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} message ListTestCasesResponse + * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage} message IntentCoverage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTestCasesResponse.toObject = function toObject(message, options) { + IntentCoverage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.testCases = []; + object.intents = []; 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.v3beta1.TestCase.toObject(message.testCases[j], options); + 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.v3beta1.IntentCoverage.Intent.toObject(message.intents[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.coverageScore != null && message.hasOwnProperty("coverageScore")) + object.coverageScore = options.json && !isFinite(message.coverageScore) ? String(message.coverageScore) : message.coverageScore; return object; }; /** - * Converts this ListTestCasesResponse to JSON. + * Converts this IntentCoverage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @instance * @returns {Object.} JSON object */ - ListTestCasesResponse.prototype.toJSON = function toJSON() { + IntentCoverage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTestCasesResponse + * Gets the default type url for IntentCoverage * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IntentCoverage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.IntentCoverage"; }; - return ListTestCasesResponse; + IntentCoverage.Intent = (function() { + + /** + * Properties of an Intent. + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @interface IIntent + * @property {string|null} [intent] Intent intent + * @property {boolean|null} [covered] Intent covered + */ + + /** + * Constructs a new Intent. + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage + * @classdesc Represents an Intent. + * @implements IIntent + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.Intent + * @instance + */ + Intent.prototype.intent = ""; + + /** + * Intent covered. + * @member {boolean} covered + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @instance + */ + Intent.prototype.covered = false; + + /** + * Creates a new Intent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.IIntent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.Intent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.Intent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.IntentCoverage.Intent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.IntentCoverage.Intent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent} Intent + */ + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.Intent) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IntentCoverage.Intent + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.IntentCoverage.Intent"; + }; + + return Intent; + })(); + + return IntentCoverage; })(); - v3beta1.BatchDeleteTestCasesRequest = (function() { + v3beta1.CalculateCoverageRequest = (function() { /** - * Properties of a BatchDeleteTestCasesRequest. + * Properties of a CalculateCoverageRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IBatchDeleteTestCasesRequest - * @property {string|null} [parent] BatchDeleteTestCasesRequest parent - * @property {Array.|null} [names] BatchDeleteTestCasesRequest names + * @interface ICalculateCoverageRequest + * @property {string|null} [agent] CalculateCoverageRequest agent + * @property {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType|null} [type] CalculateCoverageRequest type */ /** - * Constructs a new BatchDeleteTestCasesRequest. + * Constructs a new CalculateCoverageRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a BatchDeleteTestCasesRequest. - * @implements IBatchDeleteTestCasesRequest + * @classdesc Represents a CalculateCoverageRequest. + * @implements ICalculateCoverageRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest=} [properties] Properties to set */ - function BatchDeleteTestCasesRequest(properties) { - this.names = []; + function CalculateCoverageRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121299,92 +125714,89 @@ } /** - * BatchDeleteTestCasesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * CalculateCoverageRequest agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @instance */ - BatchDeleteTestCasesRequest.prototype.parent = ""; + CalculateCoverageRequest.prototype.agent = ""; /** - * BatchDeleteTestCasesRequest names. - * @member {Array.} names - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * CalculateCoverageRequest type. + * @member {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType} type + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @instance */ - BatchDeleteTestCasesRequest.prototype.names = $util.emptyArray; + CalculateCoverageRequest.prototype.type = 0; /** - * Creates a new BatchDeleteTestCasesRequest instance using the specified properties. + * Creates a new CalculateCoverageRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest instance */ - BatchDeleteTestCasesRequest.create = function create(properties) { - return new BatchDeleteTestCasesRequest(properties); + CalculateCoverageRequest.create = function create(properties) { + return new CalculateCoverageRequest(properties); }; /** - * Encodes the specified BatchDeleteTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.verify|verify} messages. + * Encodes the specified CalculateCoverageRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchDeleteTestCasesRequest.encode = function encode(message, writer) { + CalculateCoverageRequest.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]); + 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 BatchDeleteTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.verify|verify} messages. + * Encodes the specified CalculateCoverageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageRequest} message CalculateCoverageRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchDeleteTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CalculateCoverageRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer. + * Decodes a CalculateCoverageRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest * @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) { + CalculateCoverageRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 3: { + message.agent = reader.string(); break; } - case 3: { - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); + case 2: { + message.type = reader.int32(); break; } default: @@ -121396,144 +125808,181 @@ }; /** - * Decodes a BatchDeleteTestCasesRequest 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.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest * @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) { + CalculateCoverageRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchDeleteTestCasesRequest message. + * Verifies a CalculateCoverageRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @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) { + CalculateCoverageRequest.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"; - } + 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 BatchDeleteTestCasesRequest 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.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} CalculateCoverageRequest */ - BatchDeleteTestCasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) + CalculateCoverageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.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.v3beta1.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 BatchDeleteTestCasesRequest 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.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest} message CalculateCoverageRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchDeleteTestCasesRequest.toObject = function toObject(message, options) { + CalculateCoverageRequest.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]; + 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.v3beta1.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType[message.type] : message.type; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; return object; }; /** - * Converts this BatchDeleteTestCasesRequest to JSON. + * Converts this CalculateCoverageRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @instance * @returns {Object.} JSON object */ - BatchDeleteTestCasesRequest.prototype.toJSON = function toJSON() { + CalculateCoverageRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BatchDeleteTestCasesRequest + * Gets the default type url for CalculateCoverageRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BatchDeleteTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CalculateCoverageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest"; }; - return BatchDeleteTestCasesRequest; + /** + * CoverageType enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; })(); - v3beta1.CreateTestCaseRequest = (function() { + v3beta1.CalculateCoverageResponse = (function() { /** - * Properties of a CreateTestCaseRequest. + * Properties of a CalculateCoverageResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateTestCaseRequest - * @property {string|null} [parent] CreateTestCaseRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.ITestCase|null} [testCase] CreateTestCaseRequest testCase + * @interface ICalculateCoverageResponse + * @property {string|null} [agent] CalculateCoverageResponse agent + * @property {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage|null} [intentCoverage] CalculateCoverageResponse intentCoverage + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null} [transitionCoverage] CalculateCoverageResponse transitionCoverage + * @property {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null} [routeGroupCoverage] CalculateCoverageResponse routeGroupCoverage */ /** - * Constructs a new CreateTestCaseRequest. + * Constructs a new CalculateCoverageResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateTestCaseRequest. - * @implements ICreateTestCaseRequest + * @classdesc Represents a CalculateCoverageResponse. + * @implements ICalculateCoverageResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse=} [properties] Properties to set */ - function CreateTestCaseRequest(properties) { + function CalculateCoverageResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121541,89 +125990,131 @@ } /** - * CreateTestCaseRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * CalculateCoverageResponse agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @instance */ - CreateTestCaseRequest.prototype.parent = ""; + CalculateCoverageResponse.prototype.agent = ""; /** - * CreateTestCaseRequest testCase. - * @member {google.cloud.dialogflow.cx.v3beta1.ITestCase|null|undefined} testCase - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * CalculateCoverageResponse intentCoverage. + * @member {google.cloud.dialogflow.cx.v3beta1.IIntentCoverage|null|undefined} intentCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @instance */ - CreateTestCaseRequest.prototype.testCase = null; + CalculateCoverageResponse.prototype.intentCoverage = null; /** - * Creates a new CreateTestCaseRequest instance using the specified properties. + * CalculateCoverageResponse transitionCoverage. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionCoverage|null|undefined} transitionCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + * @instance + */ + CalculateCoverageResponse.prototype.transitionCoverage = null; + + /** + * CalculateCoverageResponse routeGroupCoverage. + * @member {google.cloud.dialogflow.cx.v3beta1.ITransitionRouteGroupCoverage|null|undefined} routeGroupCoverage + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse + * @instance + */ + CalculateCoverageResponse.prototype.routeGroupCoverage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CalculateCoverageResponse coverageType. + * @member {"intentCoverage"|"transitionCoverage"|"routeGroupCoverage"|undefined} coverageType + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse instance */ - CreateTestCaseRequest.create = function create(properties) { - return new CreateTestCaseRequest(properties); + CalculateCoverageResponse.create = function create(properties) { + return new CalculateCoverageResponse(properties); }; /** - * Encodes the specified CreateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.verify|verify} messages. + * Encodes the specified CalculateCoverageResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTestCaseRequest.encode = function encode(message, writer) { + CalculateCoverageResponse.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.v3beta1.TestCase.encode(message.testCase, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intentCoverage != null && Object.hasOwnProperty.call(message, "intentCoverage")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TransitionCoverage.encode(message.transitionCoverage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.agent); + if (message.routeGroupCoverage != null && Object.hasOwnProperty.call(message, "routeGroupCoverage")) + $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.encode(message.routeGroupCoverage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.verify|verify} messages. + * Encodes the specified CalculateCoverageResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICalculateCoverageResponse} message CalculateCoverageResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + CalculateCoverageResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTestCaseRequest message from the specified reader or buffer. + * Decodes a CalculateCoverageResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse * @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) { + CalculateCoverageResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + case 5: { + message.agent = reader.string(); break; } case 2: { - message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.decode(reader, reader.uint32()); + message.intentCoverage = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.decode(reader, reader.uint32()); break; } default: @@ -121635,137 +126126,184 @@ }; /** - * Decodes a CreateTestCaseRequest 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.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse * @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) { + CalculateCoverageResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTestCaseRequest message. + * Verifies a CalculateCoverageResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @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) { + CalculateCoverageResponse.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.v3beta1.TestCase.verify(message.testCase); - if (error) - return "testCase." + 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.v3beta1.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.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.verify(message.routeGroupCoverage); + if (error) + return "routeGroupCoverage." + error; + } } return null; }; /** - * Creates a CreateTestCaseRequest 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.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} CalculateCoverageResponse */ - CreateTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + CalculateCoverageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest.testCase: object expected"); - message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCase); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CalculateCoverageResponse.intentCoverage: object expected"); + message.intentCoverage = $root.google.cloud.dialogflow.cx.v3beta1.IntentCoverage.fromObject(object.intentCoverage); + } + if (object.transitionCoverage != null) { + if (typeof object.transitionCoverage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.transitionCoverage: object expected"); + message.transitionCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionCoverage.fromObject(object.transitionCoverage); + } + if (object.routeGroupCoverage != null) { + if (typeof object.routeGroupCoverage !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse.routeGroupCoverage: object expected"); + message.routeGroupCoverage = $root.google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroupCoverage.fromObject(object.routeGroupCoverage); } return message; }; /** - * Creates a plain object from a CreateTestCaseRequest 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.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} message CreateTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse} message CalculateCoverageResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTestCaseRequest.toObject = function toObject(message, options) { + CalculateCoverageResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.testCase = null; + if (options.defaults) + object.agent = ""; + if (message.intentCoverage != null && message.hasOwnProperty("intentCoverage")) { + object.intentCoverage = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.TransitionRouteGroupCoverage.toObject(message.routeGroupCoverage, options); + if (options.oneofs) + object.coverageType = "routeGroupCoverage"; } - 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.v3beta1.TestCase.toObject(message.testCase, options); return object; }; /** - * Converts this CreateTestCaseRequest to JSON. + * Converts this CalculateCoverageResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @instance * @returns {Object.} JSON object */ - CreateTestCaseRequest.prototype.toJSON = function toJSON() { + CalculateCoverageResponse.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 CalculateCoverageResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CalculateCoverageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CalculateCoverageResponse"; }; - return CreateTestCaseRequest; + return CalculateCoverageResponse; })(); - v3beta1.UpdateTestCaseRequest = (function() { + v3beta1.ListTestCasesRequest = (function() { /** - * Properties of an UpdateTestCaseRequest. + * Properties of a ListTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateTestCaseRequest - * @property {google.cloud.dialogflow.cx.v3beta1.ITestCase|null} [testCase] UpdateTestCaseRequest testCase - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTestCaseRequest updateMask + * @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.v3beta1.ListTestCasesRequest.TestCaseView|null} [view] ListTestCasesRequest view */ /** - * Constructs a new UpdateTestCaseRequest. + * Constructs a new ListTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateTestCaseRequest. - * @implements IUpdateTestCaseRequest + * @classdesc Represents a ListTestCasesRequest. + * @implements IListTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest=} [properties] Properties to set */ - function UpdateTestCaseRequest(properties) { + function ListTestCasesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121773,89 +126311,117 @@ } /** - * UpdateTestCaseRequest testCase. - * @member {google.cloud.dialogflow.cx.v3beta1.ITestCase|null|undefined} testCase - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * ListTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @instance */ - UpdateTestCaseRequest.prototype.testCase = null; + ListTestCasesRequest.prototype.parent = ""; /** - * UpdateTestCaseRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * ListTestCasesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @instance */ - UpdateTestCaseRequest.prototype.updateMask = null; + ListTestCasesRequest.prototype.pageSize = 0; /** - * Creates a new UpdateTestCaseRequest instance using the specified properties. + * ListTestCasesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @instance + */ + ListTestCasesRequest.prototype.pageToken = ""; + + /** + * ListTestCasesRequest view. + * @member {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView} view + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest + * @instance + */ + ListTestCasesRequest.prototype.view = 0; + + /** + * Creates a new ListTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest instance */ - UpdateTestCaseRequest.create = function create(properties) { - return new UpdateTestCaseRequest(properties); + ListTestCasesRequest.create = function create(properties) { + return new ListTestCasesRequest(properties); }; /** - * Encodes the specified UpdateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.verify|verify} messages. + * Encodes the specified ListTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTestCaseRequest.encode = function encode(message, writer) { + ListTestCasesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) - $root.google.cloud.dialogflow.cx.v3beta1.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.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); return writer; }; /** - * Encodes the specified UpdateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.verify|verify} messages. + * Encodes the specified ListTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesRequest} message ListTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTestCaseRequest message from the specified reader or buffer. + * Decodes a ListTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest * @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) { + ListTestCasesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.view = reader.int32(); break; } default: @@ -121867,141 +126433,189 @@ }; /** - * Decodes an UpdateTestCaseRequest 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.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest * @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) { + ListTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTestCaseRequest message. + * Verifies a ListTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @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) { + ListTestCasesRequest.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.v3beta1.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.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; + } return null; }; /** - * Creates an UpdateTestCaseRequest 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.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} ListTestCasesRequest */ - UpdateTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + ListTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(); - if (object.testCase != null) { - if (typeof object.testCase !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.testCase: object expected"); - message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCase); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; } return message; }; /** - * Creates a plain object from an UpdateTestCaseRequest 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.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} message UpdateTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest} message ListTestCasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTestCaseRequest.toObject = function toObject(message, options) { + ListTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.testCase = null; - object.updateMask = null; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "TEST_CASE_VIEW_UNSPECIFIED" : 0; } - if (message.testCase != null && message.hasOwnProperty("testCase")) - object.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.toObject(message.testCase, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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.v3beta1.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView[message.view] : message.view; return object; }; /** - * Converts this UpdateTestCaseRequest to JSON. + * Converts this ListTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @instance * @returns {Object.} JSON object */ - UpdateTestCaseRequest.prototype.toJSON = function toJSON() { + ListTestCasesRequest.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 ListTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest"; }; - return UpdateTestCaseRequest; + /** + * TestCaseView enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; })(); - v3beta1.GetTestCaseRequest = (function() { + v3beta1.ListTestCasesResponse = (function() { /** - * Properties of a GetTestCaseRequest. + * Properties of a ListTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetTestCaseRequest - * @property {string|null} [name] GetTestCaseRequest name + * @interface IListTestCasesResponse + * @property {Array.|null} [testCases] ListTestCasesResponse testCases + * @property {string|null} [nextPageToken] ListTestCasesResponse nextPageToken */ /** - * Constructs a new GetTestCaseRequest. + * Constructs a new ListTestCasesResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetTestCaseRequest. - * @implements IGetTestCaseRequest + * @classdesc Represents a ListTestCasesResponse. + * @implements IListTestCasesResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse=} [properties] Properties to set */ - function GetTestCaseRequest(properties) { + function ListTestCasesResponse(properties) { + this.testCases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122009,75 +126623,92 @@ } /** - * GetTestCaseRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * ListTestCasesResponse testCases. + * @member {Array.} testCases + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @instance */ - GetTestCaseRequest.prototype.name = ""; + ListTestCasesResponse.prototype.testCases = $util.emptyArray; /** - * Creates a new GetTestCaseRequest instance using the specified properties. + * ListTestCasesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse + * @instance + */ + ListTestCasesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTestCasesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} GetTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse instance */ - GetTestCaseRequest.create = function create(properties) { - return new GetTestCaseRequest(properties); + ListTestCasesResponse.create = function create(properties) { + return new ListTestCasesResponse(properties); }; /** - * Encodes the specified GetTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.verify|verify} messages. + * Encodes the specified ListTestCasesResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTestCaseRequest.encode = function encode(message, writer) { + ListTestCasesResponse.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.testCases != null && message.testCases.length) + for (var i = 0; i < message.testCases.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 GetTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.verify|verify} messages. + * Encodes the specified ListTestCasesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest} message GetTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListTestCasesResponse} message ListTestCasesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTestCasesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTestCaseRequest message from the specified reader or buffer. + * Decodes a ListTestCasesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseRequest} GetTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse * @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) { + ListTestCasesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.testCases && message.testCases.length)) + message.testCases = []; + message.testCases.push($root.google.cloud.dialogflow.cx.v3beta1.TestCase.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -122089,123 +126720,150 @@ }; /** - * Decodes a GetTestCaseRequest 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.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} GetTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse * @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) { + ListTestCasesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTestCaseRequest message. + * Verifies a ListTestCasesResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @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) { + ListTestCasesResponse.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.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.v3beta1.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 a GetTestCaseRequest 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.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} GetTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} ListTestCasesResponse */ - GetTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + ListTestCasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse(); + if (object.testCases) { + if (!Array.isArray(object.testCases)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListTestCasesResponse.testCases: object expected"); + message.testCases[i] = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCases[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetTestCaseRequest 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.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} message GetTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse} message ListTestCasesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTestCaseRequest.toObject = function toObject(message, options) { + ListTestCasesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.testCases = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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.v3beta1.TestCase.toObject(message.testCases[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetTestCaseRequest to JSON. + * Converts this ListTestCasesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @instance * @returns {Object.} JSON object */ - GetTestCaseRequest.prototype.toJSON = function toJSON() { + ListTestCasesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTestCaseRequest + * Gets the default type url for ListTestCasesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTestCasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse"; }; - return GetTestCaseRequest; + return ListTestCasesResponse; })(); - v3beta1.RunTestCaseRequest = (function() { + v3beta1.BatchDeleteTestCasesRequest = (function() { /** - * Properties of a RunTestCaseRequest. + * Properties of a BatchDeleteTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRunTestCaseRequest - * @property {string|null} [name] RunTestCaseRequest name - * @property {string|null} [environment] RunTestCaseRequest environment + * @interface IBatchDeleteTestCasesRequest + * @property {string|null} [parent] BatchDeleteTestCasesRequest parent + * @property {Array.|null} [names] BatchDeleteTestCasesRequest names */ /** - * Constructs a new RunTestCaseRequest. + * Constructs a new BatchDeleteTestCasesRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RunTestCaseRequest. - * @implements IRunTestCaseRequest + * @classdesc Represents a BatchDeleteTestCasesRequest. + * @implements IBatchDeleteTestCasesRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest=} [properties] Properties to set */ - function RunTestCaseRequest(properties) { + function BatchDeleteTestCasesRequest(properties) { + this.names = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122213,89 +126871,92 @@ } /** - * RunTestCaseRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * BatchDeleteTestCasesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @instance */ - RunTestCaseRequest.prototype.name = ""; + BatchDeleteTestCasesRequest.prototype.parent = ""; /** - * RunTestCaseRequest environment. - * @member {string} environment - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * BatchDeleteTestCasesRequest names. + * @member {Array.} names + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @instance */ - RunTestCaseRequest.prototype.environment = ""; + BatchDeleteTestCasesRequest.prototype.names = $util.emptyArray; /** - * Creates a new RunTestCaseRequest instance using the specified properties. + * Creates a new BatchDeleteTestCasesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} RunTestCaseRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest instance */ - RunTestCaseRequest.create = function create(properties) { - return new RunTestCaseRequest(properties); + BatchDeleteTestCasesRequest.create = function create(properties) { + return new BatchDeleteTestCasesRequest(properties); }; /** - * Encodes the specified RunTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.verify|verify} messages. + * Encodes the specified BatchDeleteTestCasesRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTestCaseRequest.encode = function encode(message, writer) { + BatchDeleteTestCasesRequest.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.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 RunTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.verify|verify} messages. + * Encodes the specified BatchDeleteTestCasesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest} message RunTestCaseRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IBatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeleteTestCasesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunTestCaseRequest message from the specified reader or buffer. + * Decodes a BatchDeleteTestCasesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunTestCaseRequest} RunTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest * @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) { + BatchDeleteTestCasesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } - case 2: { - message.environment = reader.string(); + case 3: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); break; } default: @@ -122307,131 +126968,144 @@ }; /** - * Decodes a RunTestCaseRequest 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.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} RunTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest * @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) { + BatchDeleteTestCasesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunTestCaseRequest message. + * Verifies a BatchDeleteTestCasesRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @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) { + BatchDeleteTestCasesRequest.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.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 RunTestCaseRequest 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.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} RunTestCaseRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} BatchDeleteTestCasesRequest */ - RunTestCaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + BatchDeleteTestCasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.environment != null) - message.environment = String(object.environment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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 RunTestCaseRequest 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.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} message RunTestCaseRequest + * @param {google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest} message BatchDeleteTestCasesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunTestCaseRequest.toObject = function toObject(message, options) { + BatchDeleteTestCasesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.environment = ""; + 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]; } - 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 RunTestCaseRequest to JSON. + * Converts this BatchDeleteTestCasesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @instance * @returns {Object.} JSON object */ - RunTestCaseRequest.prototype.toJSON = function toJSON() { + BatchDeleteTestCasesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunTestCaseRequest + * Gets the default type url for BatchDeleteTestCasesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchDeleteTestCasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.BatchDeleteTestCasesRequest"; }; - return RunTestCaseRequest; + return BatchDeleteTestCasesRequest; })(); - v3beta1.RunTestCaseResponse = (function() { + v3beta1.CreateTestCaseRequest = (function() { /** - * Properties of a RunTestCaseResponse. + * Properties of a CreateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRunTestCaseResponse - * @property {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null} [result] RunTestCaseResponse result + * @interface ICreateTestCaseRequest + * @property {string|null} [parent] CreateTestCaseRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.ITestCase|null} [testCase] CreateTestCaseRequest testCase */ /** - * Constructs a new RunTestCaseResponse. + * Constructs a new CreateTestCaseRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RunTestCaseResponse. - * @implements IRunTestCaseResponse + * @classdesc Represents a CreateTestCaseRequest. + * @implements ICreateTestCaseRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest=} [properties] Properties to set */ - function RunTestCaseResponse(properties) { + function CreateTestCaseRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122439,23 +127113,921 @@ } /** - * RunTestCaseResponse result. - * @member {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null|undefined} result - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse + * CreateTestCaseRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest * @instance */ - RunTestCaseResponse.prototype.result = null; + CreateTestCaseRequest.prototype.parent = ""; /** - * Creates a new RunTestCaseResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse} RunTestCaseResponse instance - */ - RunTestCaseResponse.create = function create(properties) { - return new RunTestCaseResponse(properties); + * CreateTestCaseRequest testCase. + * @member {google.cloud.dialogflow.cx.v3beta1.ITestCase|null|undefined} testCase + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @instance + */ + CreateTestCaseRequest.prototype.testCase = null; + + /** + * Creates a new CreateTestCaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest instance + */ + CreateTestCaseRequest.create = function create(properties) { + return new CreateTestCaseRequest(properties); + }; + + /** + * Encodes the specified CreateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.v3beta1.TestCase.encode(message.testCase, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateTestCaseRequest} message CreateTestCaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTestCaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTestCaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTestCaseRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @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) { + 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.v3beta1.TestCase.verify(message.testCase); + if (error) + return "testCase." + error; + } + return null; + }; + + /** + * Creates a CreateTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} CreateTestCaseRequest + */ + CreateTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateTestCaseRequest.testCase: object expected"); + message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCase); + } + return message; + }; + + /** + * Creates a plain object from a CreateTestCaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest} message CreateTestCaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTestCaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.testCase = 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.v3beta1.TestCase.toObject(message.testCase, options); + return object; + }; + + /** + * Converts this CreateTestCaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTestCaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTestCaseRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateTestCaseRequest"; + }; + + return CreateTestCaseRequest; + })(); + + v3beta1.UpdateTestCaseRequest = (function() { + + /** + * Properties of an UpdateTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateTestCaseRequest + * @property {google.cloud.dialogflow.cx.v3beta1.ITestCase|null} [testCase] UpdateTestCaseRequest testCase + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTestCaseRequest updateMask + */ + + /** + * Constructs a new UpdateTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateTestCaseRequest. + * @implements IUpdateTestCaseRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest=} [properties] Properties to set + */ + function UpdateTestCaseRequest(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]]; + } + + /** + * UpdateTestCaseRequest testCase. + * @member {google.cloud.dialogflow.cx.v3beta1.ITestCase|null|undefined} testCase + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @instance + */ + UpdateTestCaseRequest.prototype.testCase = null; + + /** + * UpdateTestCaseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @instance + */ + UpdateTestCaseRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateTestCaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest instance + */ + UpdateTestCaseRequest.create = function create(properties) { + return new UpdateTestCaseRequest(properties); + }; + + /** + * Encodes the specified UpdateTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTestCaseRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.testCase != null && Object.hasOwnProperty.call(message, "testCase")) + $root.google.cloud.dialogflow.cx.v3beta1.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 UpdateTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateTestCaseRequest} message UpdateTestCaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTestCaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTestCaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.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 UpdateTestCaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTestCaseRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.testCase != null && message.hasOwnProperty("testCase")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.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; + } + return null; + }; + + /** + * Creates an UpdateTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} UpdateTestCaseRequest + */ + UpdateTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest(); + if (object.testCase != null) { + if (typeof object.testCase !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.testCase: object expected"); + message.testCase = $root.google.cloud.dialogflow.cx.v3beta1.TestCase.fromObject(object.testCase); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateTestCaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest} message UpdateTestCaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTestCaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.testCase = null; + object.updateMask = null; + } + if (message.testCase != null && message.hasOwnProperty("testCase")) + object.testCase = $root.google.cloud.dialogflow.cx.v3beta1.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 UpdateTestCaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTestCaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTestCaseRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTestCaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateTestCaseRequest"; + }; + + return UpdateTestCaseRequest; + })(); + + v3beta1.GetTestCaseRequest = (function() { + + /** + * Properties of a GetTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetTestCaseRequest + * @property {string|null} [name] GetTestCaseRequest name + */ + + /** + * Constructs a new GetTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetTestCaseRequest. + * @implements IGetTestCaseRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } + + /** + * GetTestCaseRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @instance + */ + GetTestCaseRequest.prototype.name = ""; + + /** + * Creates a new GetTestCaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} GetTestCaseRequest instance + */ + GetTestCaseRequest.create = function create(properties) { + return new GetTestCaseRequest(properties); + }; + + /** + * Encodes the specified GetTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Encodes the specified GetTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; + + /** + * Decodes a GetTestCaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTestCaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; + }; + + /** + * Creates a GetTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest} GetTestCaseRequest + */ + GetTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest(); + if (object.name != null) + message.name = String(object.name); + 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.v3beta1.GetTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Converts this GetTestCaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.GetTestCaseRequest + * @instance + * @returns {Object.} JSON object + */ + GetTestCaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTestCaseRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetTestCaseRequest"; + }; + + return GetTestCaseRequest; + })(); + + v3beta1.RunTestCaseRequest = (function() { + + /** + * Properties of a RunTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IRunTestCaseRequest + * @property {string|null} [name] RunTestCaseRequest name + * @property {string|null} [environment] RunTestCaseRequest environment + */ + + /** + * Constructs a new RunTestCaseRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a RunTestCaseRequest. + * @implements IRunTestCaseRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } + + /** + * RunTestCaseRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @instance + */ + RunTestCaseRequest.prototype.name = ""; + + /** + * RunTestCaseRequest environment. + * @member {string} environment + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @instance + */ + RunTestCaseRequest.prototype.environment = ""; + + /** + * Creates a new RunTestCaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} RunTestCaseRequest instance + */ + RunTestCaseRequest.create = function create(properties) { + return new RunTestCaseRequest(properties); + }; + + /** + * Encodes the specified RunTestCaseRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Encodes the specified RunTestCaseRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; + + /** + * Decodes a RunTestCaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + }; + + /** + * Decodes a RunTestCaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; + + /** + * Verifies a RunTestCaseRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Creates a RunTestCaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest} RunTestCaseRequest + */ + RunTestCaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 a RunTestCaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Converts this RunTestCaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest + * @instance + * @returns {Object.} JSON object + */ + RunTestCaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunTestCaseRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RunTestCaseRequest"; + }; + + return RunTestCaseRequest; + })(); + + v3beta1.RunTestCaseResponse = (function() { + + /** + * Properties of a RunTestCaseResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IRunTestCaseResponse + * @property {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null} [result] RunTestCaseResponse result + */ + + /** + * Constructs a new RunTestCaseResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a RunTestCaseResponse. + * @implements IRunTestCaseResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse=} [properties] Properties to set + */ + function RunTestCaseResponse(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]]; + } + + /** + * RunTestCaseResponse result. + * @member {google.cloud.dialogflow.cx.v3beta1.ITestCaseResult|null|undefined} result + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse + * @instance + */ + RunTestCaseResponse.prototype.result = null; + + /** + * Creates a new RunTestCaseResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRunTestCaseResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse} RunTestCaseResponse instance + */ + RunTestCaseResponse.create = function create(properties) { + return new RunTestCaseResponse(properties); }; /** @@ -131699,9 +137271,863 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Sessions|submitAnswerFeedback}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Sessions + * @typedef SubmitAnswerFeedbackCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback} [response] AnswerFeedback + */ + + /** + * Calls SubmitAnswerFeedback. + * @function submitAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SubmitAnswerFeedbackRequest, $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback, request, callback); + }, "name", { value: "SubmitAnswerFeedback" }); + + /** + * Calls SubmitAnswerFeedback. + * @function submitAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest} request SubmitAnswerFeedbackRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Sessions; })(); + v3beta1.AnswerFeedback = (function() { + + /** + * Properties of an AnswerFeedback. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IAnswerFeedback + * @property {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating|null} [rating] AnswerFeedback rating + * @property {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason|null} [ratingReason] AnswerFeedback ratingReason + * @property {string|null} [customRating] AnswerFeedback customRating + */ + + /** + * Constructs a new AnswerFeedback. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an AnswerFeedback. + * @implements IAnswerFeedback + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.Rating} rating + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.rating = 0; + + /** + * AnswerFeedback ratingReason. + * @member {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason|null|undefined} ratingReason + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.ratingReason = null; + + /** + * AnswerFeedback customRating. + * @member {string} customRating + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.customRating = ""; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.AnswerFeedback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rating = reader.int32(); + break; + } + case 2: { + message.ratingReason = $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.decode(reader, reader.uint32()); + break; + } + case 3: { + message.customRating = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; + + /** + * Verifies an AnswerFeedback message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; + }; + + /** + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback} AnswerFeedback + */ + AnswerFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.ratingReason: object expected"); + message.ratingReason = $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.fromObject(object.ratingReason); + } + if (object.customRating != null) + message.customRating = String(object.customRating); + return message; + }; + + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.Rating[message.rating] === undefined ? message.rating : $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.Rating[message.rating] : message.rating; + if (message.ratingReason != null && message.hasOwnProperty("ratingReason")) + object.ratingReason = $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason.toObject(message.ratingReason, options); + if (message.customRating != null && message.hasOwnProperty("customRating")) + object.customRating = message.customRating; + return object; + }; + + /** + * Converts this AnswerFeedback to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @instance + * @returns {Object.} JSON object + */ + AnswerFeedback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnswerFeedback + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback"; + }; + + /** + * Rating enum. + * @name google.cloud.dialogflow.cx.v3beta1.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; + })(); + + AnswerFeedback.RatingReason = (function() { + + /** + * Properties of a RatingReason. + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @interface IRatingReason + * @property {Array.|null} [reasonLabels] RatingReason reasonLabels + * @property {string|null} [feedback] RatingReason feedback + */ + + /** + * Constructs a new RatingReason. + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback + * @classdesc Represents a RatingReason. + * @implements IRatingReason + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } + + /** + * RatingReason reasonLabels. + * @member {Array.} reasonLabels + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.reasonLabels = $util.emptyArray; + + /** + * RatingReason feedback. + * @member {string} feedback + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + * @instance + */ + RatingReason.prototype.feedback = ""; + + /** + * Creates a new RatingReason instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.IRatingReason=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.RatingReason.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.RatingReason.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason} RatingReason + */ + RatingReason.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.RatingReason(); + if (object.reasonLabels) { + if (!Array.isArray(object.reasonLabels)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.AnswerFeedback.RatingReason + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.AnswerFeedback.RatingReason"; + }; + + return RatingReason; + })(); + + return AnswerFeedback; + })(); + + v3beta1.SubmitAnswerFeedbackRequest = (function() { + + /** + * Properties of a SubmitAnswerFeedbackRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ISubmitAnswerFeedbackRequest + * @property {string|null} [session] SubmitAnswerFeedbackRequest session + * @property {string|null} [responseId] SubmitAnswerFeedbackRequest responseId + * @property {google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback|null} [answerFeedback] SubmitAnswerFeedbackRequest answerFeedback + * @property {google.protobuf.IFieldMask|null} [updateMask] SubmitAnswerFeedbackRequest updateMask + */ + + /** + * Constructs a new SubmitAnswerFeedbackRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SubmitAnswerFeedbackRequest. + * @implements ISubmitAnswerFeedbackRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.session = ""; + + /** + * SubmitAnswerFeedbackRequest responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.responseId = ""; + + /** + * SubmitAnswerFeedbackRequest answerFeedback. + * @member {google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback|null|undefined} answerFeedback + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.answerFeedback = null; + + /** + * SubmitAnswerFeedbackRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @instance + */ + SubmitAnswerFeedbackRequest.prototype.updateMask = null; + + /** + * Creates a new SubmitAnswerFeedbackRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest instance + */ + SubmitAnswerFeedbackRequest.create = function create(properties) { + return new SubmitAnswerFeedbackRequest(properties); + }; + + /** + * Encodes the specified SubmitAnswerFeedbackRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitAnswerFeedbackRequest.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.v3beta1.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 SubmitAnswerFeedbackRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitAnswerFeedbackRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.session = reader.string(); + break; + } + case 2: { + message.responseId = reader.string(); + break; + } + case 3: { + message.answerFeedback = $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubmitAnswerFeedbackRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubmitAnswerFeedbackRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @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) { + 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.v3beta1.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; + } + return null; + }; + + /** + * Creates a SubmitAnswerFeedbackRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} SubmitAnswerFeedbackRequest + */ + SubmitAnswerFeedbackRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SubmitAnswerFeedbackRequest.answerFeedback: object expected"); + message.answerFeedback = $root.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback.fromObject(object.answerFeedback); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SubmitAnswerFeedbackRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest} message SubmitAnswerFeedbackRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitAnswerFeedbackRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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.v3beta1.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 SubmitAnswerFeedbackRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @instance + * @returns {Object.} JSON object + */ + SubmitAnswerFeedbackRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubmitAnswerFeedbackRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitAnswerFeedbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest"; + }; + + return SubmitAnswerFeedbackRequest; + })(); + v3beta1.DetectIntentRequest = (function() { /** @@ -134159,6 +140585,8 @@ * @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.v3beta1.ISearchConfig|null} [searchConfig] QueryParameters searchConfig */ /** @@ -134275,6 +140703,22 @@ */ QueryParameters.prototype.sessionTtl = null; + /** + * QueryParameters endUserMetadata. + * @member {google.protobuf.IStruct|null|undefined} endUserMetadata + * @memberof google.cloud.dialogflow.cx.v3beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.endUserMetadata = null; + + /** + * QueryParameters searchConfig. + * @member {google.cloud.dialogflow.cx.v3beta1.ISearchConfig|null|undefined} searchConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.searchConfig = null; + /** * Creates a new QueryParameters instance using the specified properties. * @function create @@ -134326,6 +140770,10 @@ 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.v3beta1.SearchConfig.encode(message.searchConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); return writer; }; @@ -134431,6 +140879,14 @@ 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.v3beta1.SearchConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -134525,6 +140981,16 @@ 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.v3beta1.SearchConfig.verify(message.searchConfig); + if (error) + return "searchConfig." + error; + } return null; }; @@ -134594,6 +141060,16 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.QueryParameters.searchConfig: object expected"); + message.searchConfig = $root.google.cloud.dialogflow.cx.v3beta1.SearchConfig.fromObject(object.searchConfig); + } return message; }; @@ -134626,6 +141102,8 @@ object.analyzeQueryTextSentiment = false; object.channel = ""; object.sessionTtl = null; + object.endUserMetadata = null; + object.searchConfig = null; } if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; @@ -134661,6 +141139,10 @@ 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.v3beta1.SearchConfig.toObject(message.searchConfig, options); return object; }; @@ -134693,6 +141175,1233 @@ return QueryParameters; })(); + v3beta1.SearchConfig = (function() { + + /** + * Properties of a SearchConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ISearchConfig + * @property {Array.|null} [boostSpecs] SearchConfig boostSpecs + * @property {Array.|null} [filterSpecs] SearchConfig filterSpecs + */ + + /** + * Constructs a new SearchConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a SearchConfig. + * @implements ISearchConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ISearchConfig=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchConfig boostSpecs. + * @member {Array.} boostSpecs + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @instance + */ + SearchConfig.prototype.boostSpecs = $util.emptyArray; + + /** + * SearchConfig filterSpecs. + * @member {Array.} filterSpecs + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @instance + */ + SearchConfig.prototype.filterSpecs = $util.emptyArray; + + /** + * Creates a new SearchConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISearchConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.SearchConfig} SearchConfig instance + */ + SearchConfig.create = function create(properties) { + return new SearchConfig(properties); + }; + + /** + * Encodes the specified SearchConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.SearchConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISearchConfig} message SearchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConfig.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.v3beta1.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.v3beta1.FilterSpecs.encode(message.filterSpecs[i], 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.v3beta1.SearchConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ISearchConfig} message SearchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SearchConfig} SearchConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.SearchConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.boostSpecs && message.boostSpecs.length)) + message.boostSpecs = []; + message.boostSpecs.push($root.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.filterSpecs && message.filterSpecs.length)) + message.filterSpecs = []; + message.filterSpecs.push($root.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.SearchConfig} SearchConfig + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchConfig message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @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) { + 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.v3beta1.BoostSpecs.verify(message.boostSpecs[i]); + if (error) + return "boostSpecs." + 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.v3beta1.FilterSpecs.verify(message.filterSpecs[i]); + if (error) + return "filterSpecs." + error; + } + } + return null; + }; + + /** + * Creates a SearchConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.SearchConfig} SearchConfig + */ + SearchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.SearchConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.SearchConfig(); + if (object.boostSpecs) { + if (!Array.isArray(object.boostSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SearchConfig.boostSpecs: object expected"); + message.boostSpecs[i] = $root.google.cloud.dialogflow.cx.v3beta1.BoostSpecs.fromObject(object.boostSpecs[i]); + } + } + if (object.filterSpecs) { + if (!Array.isArray(object.filterSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SearchConfig.filterSpecs: object expected"); + message.filterSpecs[i] = $root.google.cloud.dialogflow.cx.v3beta1.FilterSpecs.fromObject(object.filterSpecs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.SearchConfig} message SearchConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchConfig.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.v3beta1.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.v3beta1.FilterSpecs.toObject(message.filterSpecs[j], options); + } + return object; + }; + + /** + * Converts this SearchConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @instance + * @returns {Object.} JSON object + */ + SearchConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.SearchConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.SearchConfig"; + }; + + return SearchConfig; + })(); + + v3beta1.BoostSpec = (function() { + + /** + * Properties of a BoostSpec. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IBoostSpec + * @property {Array.|null} [conditionBoostSpecs] BoostSpec conditionBoostSpecs + */ + + /** + * Constructs a new BoostSpec. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a BoostSpec. + * @implements IBoostSpec + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IBoostSpec=} [properties] Properties to set + */ + function BoostSpec(properties) { + this.conditionBoostSpecs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoostSpec conditionBoostSpecs. + * @member {Array.} conditionBoostSpecs + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @instance + */ + BoostSpec.prototype.conditionBoostSpecs = $util.emptyArray; + + /** + * Creates a new BoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IBoostSpec=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpec} BoostSpec instance + */ + BoostSpec.create = function create(properties) { + return new BoostSpec(properties); + }; + + /** + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IBoostSpec} message BoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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.v3beta1.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.v3beta1.BoostSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IBoostSpec} message BoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BoostSpec} BoostSpec + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conditionBoostSpecs && message.conditionBoostSpecs.length)) + message.conditionBoostSpecs = []; + message.conditionBoostSpecs.push($root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpec} BoostSpec + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoostSpec message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @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) { + 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.v3beta1.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. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpec} BoostSpec + */ + BoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec(); + if (object.conditionBoostSpecs) { + if (!Array.isArray(object.conditionBoostSpecs)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BoostSpec.conditionBoostSpecs: object expected"); + message.conditionBoostSpecs[i] = $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.fromObject(object.conditionBoostSpecs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.BoostSpec} message BoostSpec + * @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.v3beta1.BoostSpec.ConditionBoostSpec.toObject(message.conditionBoostSpecs[j], options); + } + return object; + }; + + /** + * Converts this BoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @instance + * @returns {Object.} JSON object + */ + BoostSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoostSpec + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.BoostSpec"; + }; + + BoostSpec.ConditionBoostSpec = (function() { + + /** + * Properties of a ConditionBoostSpec. + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @interface IConditionBoostSpec + * @property {string|null} [condition] ConditionBoostSpec condition + * @property {number|null} [boost] ConditionBoostSpec boost + */ + + /** + * Constructs a new ConditionBoostSpec. + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec + * @classdesc Represents a ConditionBoostSpec. + * @implements IConditionBoostSpec + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } + + /** + * ConditionBoostSpec condition. + * @member {string} condition + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.condition = ""; + + /** + * ConditionBoostSpec boost. + * @member {number} boost + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.boost = 0; + + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.BoostSpec.IConditionBoostSpec=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} ConditionBoostSpec instance + */ + ConditionBoostSpec.create = function create(properties) { + return new ConditionBoostSpec(properties); + }; + + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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); + return writer; + }; + + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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 ConditionBoostSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + message.boost = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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 ConditionBoostSpec message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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"; + return null; + }; + + /** + * Creates a ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + */ + ConditionBoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.boost != null) + message.boost = Number(object.boost); + 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.v3beta1.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + } + 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; + return object; + }; + + /** + * Converts this ConditionBoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpec.ConditionBoostSpec + * @instance + * @returns {Object.} JSON object + */ + ConditionBoostSpec.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.v3beta1.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.v3beta1.BoostSpec.ConditionBoostSpec"; + }; + + return ConditionBoostSpec; + })(); + + return BoostSpec; + })(); + + v3beta1.BoostSpecs = (function() { + + /** + * Properties of a BoostSpecs. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IBoostSpecs + * @property {Array.|null} [dataStores] BoostSpecs dataStores + * @property {Array.|null} [spec] BoostSpecs spec + */ + + /** + * Constructs a new BoostSpecs. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a BoostSpecs. + * @implements IBoostSpecs + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BoostSpecs + * @instance + */ + BoostSpecs.prototype.dataStores = $util.emptyArray; + + /** + * BoostSpecs spec. + * @member {Array.} spec + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @instance + */ + BoostSpecs.prototype.spec = $util.emptyArray; + + /** + * Creates a new BoostSpecs instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IBoostSpecs=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.BoostSpecs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.BoostSpecs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpecs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataStores && message.dataStores.length)) + message.dataStores = []; + message.dataStores.push(reader.string()); + break; + } + case 2: { + if (!(message.spec && message.spec.length)) + message.spec = []; + message.spec.push($root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoostSpecs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpecs} BoostSpecs + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoostSpecs message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @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) { + 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.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.v3beta1.BoostSpec.verify(message.spec[i]); + if (error) + return "spec." + error; + } + } + return null; + }; + + /** + * Creates a BoostSpecs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.BoostSpecs} BoostSpecs + */ + BoostSpecs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.BoostSpecs) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.BoostSpecs(); + if (object.dataStores) { + if (!Array.isArray(object.dataStores)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.BoostSpecs.spec: object expected"); + message.spec[i] = $root.google.cloud.dialogflow.cx.v3beta1.BoostSpec.fromObject(object.spec[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BoostSpecs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.BoostSpecs} message BoostSpecs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoostSpecs.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.v3beta1.BoostSpec.toObject(message.spec[j], options); + } + return object; + }; + + /** + * Converts this BoostSpecs to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @instance + * @returns {Object.} JSON object + */ + BoostSpecs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoostSpecs + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.BoostSpecs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostSpecs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.BoostSpecs"; + }; + + return BoostSpecs; + })(); + + v3beta1.FilterSpecs = (function() { + + /** + * Properties of a FilterSpecs. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IFilterSpecs + * @property {Array.|null} [dataStores] FilterSpecs dataStores + * @property {string|null} [filter] FilterSpecs filter + */ + + /** + * Constructs a new FilterSpecs. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a FilterSpecs. + * @implements IFilterSpecs + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.IFilterSpecs=} [properties] Properties to set + */ + 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]]; + } + + /** + * FilterSpecs dataStores. + * @member {Array.} dataStores + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @instance + */ + FilterSpecs.prototype.dataStores = $util.emptyArray; + + /** + * FilterSpecs filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @instance + */ + FilterSpecs.prototype.filter = ""; + + /** + * Creates a new FilterSpecs instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFilterSpecs=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.FilterSpecs} FilterSpecs instance + */ + FilterSpecs.create = function create(properties) { + return new FilterSpecs(properties); + }; + + /** + * Encodes the specified FilterSpecs message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FilterSpecs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Encodes the specified FilterSpecs message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.FilterSpecs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IFilterSpecs} message FilterSpecs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FilterSpecs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.FilterSpecs(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + }; + + /** + * Decodes a FilterSpecs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; + + /** + * Verifies a FilterSpecs message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @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) { + 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; + }; + + /** + * Creates a FilterSpecs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.FilterSpecs} FilterSpecs + */ + FilterSpecs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.FilterSpecs) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.FilterSpecs(); + if (object.dataStores) { + if (!Array.isArray(object.dataStores)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Creates a plain object from a FilterSpecs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; + + /** + * Converts this FilterSpecs to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.FilterSpecs + * @instance + * @returns {Object.} JSON object + */ + FilterSpecs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FilterSpecs + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.FilterSpecs"; + }; + + return FilterSpecs; + })(); + v3beta1.QueryInput = (function() { /** @@ -135107,6 +142816,7 @@ * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo * @property {google.cloud.dialogflow.cx.v3beta1.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] QueryResult advancedSettings + * @property {boolean|null} [allowAnswerFeedback] QueryResult allowAnswerFeedback */ /** @@ -135263,6 +142973,14 @@ */ QueryResult.prototype.advancedSettings = null; + /** + * QueryResult allowAnswerFeedback. + * @member {boolean} allowAnswerFeedback + * @memberof google.cloud.dialogflow.cx.v3beta1.QueryResult + * @instance + */ + QueryResult.prototype.allowAnswerFeedback = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -135338,6 +143056,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DtmfInput.encode(message.dtmf, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.allowAnswerFeedback != null && Object.hasOwnProperty.call(message, "allowAnswerFeedback")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.allowAnswerFeedback); return writer; }; @@ -135446,6 +143166,10 @@ message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); break; } + case 32: { + message.allowAnswerFeedback = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -135586,6 +143310,9 @@ if (error) return "advancedSettings." + error; } + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + if (typeof message.allowAnswerFeedback !== "boolean") + return "allowAnswerFeedback: boolean expected"; return null; }; @@ -135683,6 +143410,8 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.QueryResult.advancedSettings: object expected"); message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.fromObject(object.advancedSettings); } + if (object.allowAnswerFeedback != null) + message.allowAnswerFeedback = Boolean(object.allowAnswerFeedback); return message; }; @@ -135714,6 +143443,7 @@ object.match = null; object.sentimentAnalysisResult = null; object.advancedSettings = null; + object.allowAnswerFeedback = false; } if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; @@ -135773,6 +143503,8 @@ if (options.oneofs) object.query = "dtmf"; } + if (message.allowAnswerFeedback != null && message.hasOwnProperty("allowAnswerFeedback")) + object.allowAnswerFeedback = message.allowAnswerFeedback; return object; }; @@ -150459,645 +158191,3732 @@ */ Metric.prototype.ratio = null; - /** - * Metric count. - * @member {number|null|undefined} count - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @instance - */ - Metric.prototype.count = null; + /** + * Metric count. + * @member {number|null|undefined} count + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @instance + */ + Metric.prototype.count = null; + + /** + * Metric confidenceInterval. + * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.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.v3beta1.Experiment.Result.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric.confidenceInterval: object expected"); + message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType[message.countType] : message.countType; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.Metric"; + }; + + return Metric; + })(); + + Result.VersionMetrics = (function() { + + /** + * Properties of a VersionMetrics. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result + * @classdesc Represents a VersionMetrics. + * @implements IVersionMetrics + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.version = ""; + + /** + * VersionMetrics metrics. + * @member {Array.} metrics + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.metrics = $util.emptyArray; + + /** + * VersionMetrics sessionCount. + * @member {number} sessionCount + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @instance + */ + VersionMetrics.prototype.sessionCount = 0; + + /** + * Creates a new VersionMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics + */ + VersionMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics.metrics: object expected"); + message.metrics[i] = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics"; + }; + + return VersionMetrics; + })(); + + return Result; + })(); + + return Experiment; + })(); + + v3beta1.VersionVariants = (function() { + + /** + * Properties of a VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IVersionVariants + * @property {Array.|null} [variants] VersionVariants variants + */ + + /** + * Constructs a new VersionVariants. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a VersionVariants. + * @implements IVersionVariants + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants + * @instance + */ + VersionVariants.prototype.variants = $util.emptyArray; + + /** + * Creates a new VersionVariants instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.VersionVariants.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.variants && message.variants.length)) + message.variants = []; + message.variants.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.VersionVariants + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants + */ + VersionVariants.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + if (object.variants) { + if (!Array.isArray(object.variants)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.variants: object expected"); + message.variants[i] = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant.toObject(message.variants[j], options); + } + return object; + }; + + /** + * Converts this VersionVariants to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.VersionVariants"; + }; + + VersionVariants.Variant = (function() { + + /** + * Properties of a Variant. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants + * @classdesc Represents a Variant. + * @implements IVariant + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant + * @instance + */ + Variant.prototype.version = ""; + + /** + * Variant trafficAllocation. + * @member {number} trafficAllocation + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @instance + */ + Variant.prototype.trafficAllocation = 0; + + /** + * Variant isControlGroup. + * @member {boolean} isControlGroup + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @instance + */ + Variant.prototype.isControlGroup = false; + + /** + * Creates a new Variant instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.VersionVariants.Variant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.VersionVariants.Variant + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant + */ + Variant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.VersionVariants.Variant"; + }; + + return Variant; + })(); + + return VersionVariants; + })(); + + v3beta1.RolloutConfig = (function() { + + /** + * Properties of a RolloutConfig. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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.v3beta1 + * @classdesc Represents a RolloutConfig. + * @implements IRolloutConfig + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig + * @instance + */ + RolloutConfig.prototype.rolloutSteps = $util.emptyArray; + + /** + * RolloutConfig rolloutCondition. + * @member {string} rolloutCondition + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @instance + */ + RolloutConfig.prototype.rolloutCondition = ""; + + /** + * RolloutConfig failureCondition. + * @member {string} failureCondition + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @instance + */ + RolloutConfig.prototype.failureCondition = ""; + + /** + * Creates a new RolloutConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rolloutSteps && message.rolloutSteps.length)) + message.rolloutSteps = []; + message.rolloutSteps.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig} RolloutConfig + */ + RolloutConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig(); + if (object.rolloutSteps) { + if (!Array.isArray(object.rolloutSteps)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.rolloutSteps: object expected"); + message.rolloutSteps[i] = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig"; + }; + + RolloutConfig.RolloutStep = (function() { + + /** + * Properties of a RolloutStep. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig + * @classdesc Represents a RolloutStep. + * @implements IRolloutStep + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.displayName = ""; + + /** + * RolloutStep trafficPercent. + * @member {number} trafficPercent + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.trafficPercent = 0; + + /** + * RolloutStep minDuration. + * @member {google.protobuf.IDuration|null|undefined} minDuration + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @instance + */ + RolloutStep.prototype.minDuration = null; + + /** + * Creates a new RolloutStep instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.RolloutStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.RolloutStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep} RolloutStep + */ + RolloutStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig.RolloutStep + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.RolloutConfig.RolloutStep"; + }; + + return RolloutStep; + })(); + + return RolloutConfig; + })(); + + v3beta1.RolloutState = (function() { + + /** + * Properties of a RolloutState. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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.v3beta1 + * @classdesc Represents a RolloutState. + * @implements IRolloutState + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState + * @instance + */ + RolloutState.prototype.step = ""; + + /** + * RolloutState stepIndex. + * @member {number} stepIndex + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState + * @instance + */ + RolloutState.prototype.stepIndex = 0; + + /** + * RolloutState startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState + * @instance + */ + RolloutState.prototype.startTime = null; + + /** + * Creates a new RolloutState instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutState=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutState(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.RolloutState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutState + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutState} RolloutState + */ + RolloutState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutState) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutState + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.RolloutState"; + }; + + return RolloutState; + })(); + + v3beta1.VariantsHistory = (function() { + + /** + * Properties of a VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IVariantsHistory + * @property {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants + * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime + */ + + /** + * Constructs a new VariantsHistory. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a VariantsHistory. + * @implements IVariantsHistory + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants|null|undefined} versionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @instance + */ + VariantsHistory.prototype.versionVariants = null; + + /** + * VariantsHistory updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VariantsHistory.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.VariantsHistory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VariantsHistory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.VariantsHistory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + */ + VariantsHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + if (object.versionVariants != null) { + if (typeof object.versionVariants !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VariantsHistory.versionVariants: object expected"); + message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.fromObject(object.versionVariants); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VariantsHistory + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.VariantsHistory"; + }; + + return VariantsHistory; + })(); + + v3beta1.ListExperimentsRequest = (function() { + + /** + * Properties of a ListExperimentsRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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.v3beta1 + * @classdesc Represents a ListExperimentsRequest. + * @implements IListExperimentsRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.parent = ""; + + /** + * ListExperimentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.pageSize = 0; + + /** + * ListExperimentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @instance + */ + ListExperimentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListExperimentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.ListExperimentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.ListExperimentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest + */ + ListExperimentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ListExperimentsRequest"; + }; + + return ListExperimentsRequest; + })(); + + v3beta1.ListExperimentsResponse = (function() { + + /** + * Properties of a ListExperimentsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IListExperimentsResponse + * @property {Array.|null} [experiments] ListExperimentsResponse experiments + * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken + */ + + /** + * Constructs a new ListExperimentsResponse. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a ListExperimentsResponse. + * @implements IListExperimentsResponse + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse + * @instance + */ + ListExperimentsResponse.prototype.experiments = $util.emptyArray; + + /** + * ListExperimentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @instance + */ + ListExperimentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListExperimentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.ListExperimentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.experiments && message.experiments.length)) + message.experiments = []; + message.experiments.push($root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ListExperimentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse + */ + ListExperimentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + if (object.experiments) { + if (!Array.isArray(object.experiments)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse.experiments: object expected"); + message.experiments[i] = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ListExperimentsResponse"; + }; + + return ListExperimentsResponse; + })(); + + v3beta1.GetExperimentRequest = (function() { + + /** + * Properties of a GetExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IGetExperimentRequest + * @property {string|null} [name] GetExperimentRequest name + */ + + /** + * Constructs a new GetExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a GetExperimentRequest. + * @implements IGetExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetExperimentRequest + * @instance + */ + GetExperimentRequest.prototype.name = ""; + + /** + * Creates a new GetExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.v3beta1.GetExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.GetExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest + */ + GetExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.GetExperimentRequest"; + }; + + return GetExperimentRequest; + })(); + + v3beta1.CreateExperimentRequest = (function() { + + /** + * Properties of a CreateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ICreateExperimentRequest + * @property {string|null} [parent] CreateExperimentRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] CreateExperimentRequest experiment + */ + + /** + * Constructs a new CreateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a CreateExperimentRequest. + * @implements ICreateExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest + * @instance + */ + CreateExperimentRequest.prototype.parent = ""; + + /** + * CreateExperimentRequest experiment. + * @member {google.cloud.dialogflow.cx.v3beta1.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @instance + */ + CreateExperimentRequest.prototype.experiment = null; + + /** + * Creates a new CreateExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.CreateExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.CreateExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest + */ + CreateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.toObject(message.experiment, options); + return object; + }; + + /** + * Converts this CreateExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.CreateExperimentRequest"; + }; + + return CreateExperimentRequest; + })(); + + v3beta1.UpdateExperimentRequest = (function() { + + /** + * Properties of an UpdateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IUpdateExperimentRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] UpdateExperimentRequest experiment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask + */ + + /** + * Constructs a new UpdateExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents an UpdateExperimentRequest. + * @implements IUpdateExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IExperiment|null|undefined} experiment + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @instance + */ + UpdateExperimentRequest.prototype.experiment = null; + + /** + * UpdateExperimentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @instance + */ + UpdateExperimentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.UpdateExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest + */ + UpdateExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + if (object.experiment != null) { + if (typeof object.experiment !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.experiment: object expected"); + message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.UpdateExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Metric confidenceInterval. - * @member {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IConfidenceInterval|null|undefined} confidenceInterval - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @instance - */ - Metric.prototype.confidenceInterval = null; + /** + * Gets the default type url for UpdateExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return UpdateExperimentRequest; + })(); - /** - * Metric value. - * @member {"ratio"|"count"|undefined} value - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @instance - */ - Object.defineProperty(Metric.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["ratio", "count"]), - set: $util.oneOfSetter($oneOfFields) - }); + v3beta1.DeleteExperimentRequest = (function() { - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IMetric=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; + /** + * Properties of a DeleteExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IDeleteExperimentRequest + * @property {string|null} [name] DeleteExperimentRequest name + */ - /** - * Encodes the specified Metric message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; - }; + /** + * Constructs a new DeleteExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a DeleteExperimentRequest. + * @implements IDeleteExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + /** + * DeleteExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @instance + */ + DeleteExperimentRequest.prototype.name = ""; - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.Experiment.Result.ConfidenceInterval.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new DeleteExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest instance + */ + DeleteExperimentRequest.create = function create(properties) { + return new DeleteExperimentRequest(properties); + }; - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Encodes the specified DeleteExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; - /** - * Verifies a Metric message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.ConfidenceInterval.verify(message.confidenceInterval); - if (error) - return "confidenceInterval." + error; - } - return null; - }; + /** + * Encodes the specified DeleteExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); 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.v3beta1.Experiment.Result.Metric.confidenceInterval: object expected"); - message.confidenceInterval = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType[message.countType] : message.countType; - return object; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a DeleteExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric"; - }; + /** + * Verifies a DeleteExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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; + }; - return Metric; - })(); + /** + * Creates a DeleteExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest + */ + DeleteExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - Result.VersionMetrics = (function() { + /** + * Creates a plain object from a DeleteExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; - /** - * Properties of a VersionMetrics. - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result - * @interface IVersionMetrics - * @property {string|null} [version] VersionMetrics version - * @property {Array.|null} [metrics] VersionMetrics metrics - * @property {number|null} [sessionCount] VersionMetrics sessionCount - */ + /** + * Converts this DeleteExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new VersionMetrics. - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result - * @classdesc Represents a VersionMetrics. - * @implements IVersionMetrics - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * Gets the default type url for DeleteExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteExperimentRequest"; + }; - /** - * VersionMetrics version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.version = ""; + return DeleteExperimentRequest; + })(); - /** - * VersionMetrics metrics. - * @member {Array.} metrics - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.metrics = $util.emptyArray; + v3beta1.StartExperimentRequest = (function() { - /** - * VersionMetrics sessionCount. - * @member {number} sessionCount - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @instance - */ - VersionMetrics.prototype.sessionCount = 0; + /** + * Properties of a StartExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface IStartExperimentRequest + * @property {string|null} [name] StartExperimentRequest name + */ - /** - * Creates a new VersionMetrics instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.IVersionMetrics=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics instance - */ - VersionMetrics.create = function create(properties) { - return new VersionMetrics(properties); - }; + /** + * Constructs a new StartExperimentRequest. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a StartExperimentRequest. + * @implements IStartExperimentRequest + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.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]]; + } - /** - * Encodes the specified VersionMetrics message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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; - }; + /** + * StartExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @instance + */ + StartExperimentRequest.prototype.name = ""; - /** - * Encodes the specified VersionMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + /** + * Creates a new StartExperimentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest instance + */ + StartExperimentRequest.create = function create(properties) { + return new StartExperimentRequest(properties); + }; - /** - * Decodes a VersionMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.Experiment.Result.Metric.decode(reader, reader.uint32())); - break; - } - case 3: { - message.sessionCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; - /** - * Decodes a VersionMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Encodes the specified StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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(); + }; - /** - * Verifies a VersionMetrics message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = 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.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics} VersionMetrics - */ - VersionMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics.metrics: object expected"); - message.metrics[i] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.fromObject(object.metrics[i]); - } - } - if (object.sessionCount != null) - message.sessionCount = object.sessionCount | 0; - return message; - }; + /** + * Decodes a StartExperimentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.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()); + }; - /** - * Creates a plain object from a VersionMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.Metric.toObject(message.metrics[j], options); - } - if (message.sessionCount != null && message.hasOwnProperty("sessionCount")) - object.sessionCount = message.sessionCount; - return object; - }; + /** + * Verifies a StartExperimentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.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; + }; - /** - * Converts this VersionMetrics to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics - * @instance - * @returns {Object.} JSON object - */ - VersionMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a StartExperimentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest + */ + StartExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Gets the default type url for VersionMetrics - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Experiment.Result.VersionMetrics"; - }; + /** + * Creates a plain object from a StartExperimentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.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; + }; - return VersionMetrics; - })(); + /** + * Converts this StartExperimentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @instance + * @returns {Object.} JSON object + */ + StartExperimentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Result; - })(); + /** + * Gets the default type url for StartExperimentRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StartExperimentRequest"; + }; - return Experiment; + return StartExperimentRequest; })(); - v3beta1.VersionVariants = (function() { + v3beta1.StopExperimentRequest = (function() { /** - * Properties of a VersionVariants. + * Properties of a StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IVersionVariants - * @property {Array.|null} [variants] VersionVariants variants + * @interface IStopExperimentRequest + * @property {string|null} [name] StopExperimentRequest name */ /** - * Constructs a new VersionVariants. + * Constructs a new StopExperimentRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a VersionVariants. - * @implements IVersionVariants + * @classdesc Represents a StopExperimentRequest. + * @implements IStopExperimentRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest=} [properties] Properties to set */ - function VersionVariants(properties) { - this.variants = []; + function StopExperimentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -151105,78 +161924,75 @@ } /** - * VersionVariants variants. - * @member {Array.} variants - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * StopExperimentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @instance */ - VersionVariants.prototype.variants = $util.emptyArray; + StopExperimentRequest.prototype.name = ""; /** - * Creates a new VersionVariants instance using the specified properties. + * Creates a new StopExperimentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants instance + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest instance */ - VersionVariants.create = function create(properties) { - return new VersionVariants(properties); + StopExperimentRequest.create = function create(properties) { + return new StopExperimentRequest(properties); }; /** - * Encodes the specified VersionVariants message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. + * Encodes the specified StopExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants} message VersionVariants message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionVariants.encode = function encode(message, writer) { + StopExperimentRequest.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.v3beta1.VersionVariants.Variant.encode(message.variants[i], 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); return writer; }; /** - * Encodes the specified VersionVariants message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.verify|verify} messages. + * Encodes the specified StopExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVersionVariants} message VersionVariants message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest} message StopExperimentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VersionVariants.encodeDelimited = function encodeDelimited(message, writer) { + StopExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VersionVariants message from the specified reader or buffer. + * Decodes a StopExperimentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest * @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) { + StopExperimentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.variants && message.variants.length)) - message.variants = []; - message.variants.push($root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -151188,392 +162004,326 @@ }; /** - * Decodes a VersionVariants message from the specified reader or buffer, length delimited. + * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest * @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) { + StopExperimentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VersionVariants message. + * Verifies a StopExperimentRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @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) { + StopExperimentRequest.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.v3beta1.VersionVariants.Variant.verify(message.variants[i]); - if (error) - return "variants." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a VersionVariants message from a plain object. Also converts values to their respective internal types. + * Creates a StopExperimentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants} VersionVariants + * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest */ - VersionVariants.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants) + StopExperimentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants(); - if (object.variants) { - if (!Array.isArray(object.variants)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.variants: object expected"); - message.variants[i] = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.fromObject(object.variants[i]); - } - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a VersionVariants message. Also converts values to other types if specified. + * Creates a plain object from a StopExperimentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants} message VersionVariants + * @param {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} message StopExperimentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VersionVariants.toObject = function toObject(message, options) { + StopExperimentRequest.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.v3beta1.VersionVariants.Variant.toObject(message.variants[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this VersionVariants to JSON. + * Converts this StopExperimentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @instance * @returns {Object.} JSON object */ - VersionVariants.prototype.toJSON = function toJSON() { + StopExperimentRequest.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 StopExperimentRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants + * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VersionVariants.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StopExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VersionVariants"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest"; }; - VersionVariants.Variant = (function() { + return StopExperimentRequest; + })(); - /** - * Properties of a Variant. - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants - * @interface IVariant - * @property {string|null} [version] Variant version - * @property {number|null} [trafficAllocation] Variant trafficAllocation - * @property {boolean|null} [isControlGroup] Variant isControlGroup - */ + v3beta1.Generators = (function() { - /** - * Constructs a new Variant. - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants - * @classdesc Represents a Variant. - * @implements IVariant - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + /** + * Constructs a new Generators service. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @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); + } - /** - * Variant version. - * @member {string} version - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @instance - */ - Variant.prototype.version = ""; + (Generators.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Generators; - /** - * Variant trafficAllocation. - * @member {number} trafficAllocation - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @instance - */ - Variant.prototype.trafficAllocation = 0; + /** + * Creates new Generators service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.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); + }; - /** - * Variant isControlGroup. - * @member {boolean} isControlGroup - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @instance - */ - Variant.prototype.isControlGroup = false; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|listGenerators}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @typedef ListGeneratorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} [response] ListGeneratorsResponse + */ - /** - * Creates a new Variant instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VersionVariants.IVariant=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant instance - */ - Variant.create = function create(properties) { - return new Variant(properties); - }; + /** + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListGeneratorsRequest, $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse, request, callback); + }, "name", { value: "ListGenerators" }); - /** - * Encodes the specified Variant message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Calls ListGenerators. + * @function listGenerators + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest} request ListGeneratorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Variant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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(); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|getGenerator}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @typedef GetGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} [response] Generator + */ - /** - * Decodes a Variant message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - }; + /** + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest} request GetGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetGeneratorRequest, $root.google.cloud.dialogflow.cx.v3beta1.Generator, request, callback); + }, "name", { value: "GetGenerator" }); - /** - * Decodes a Variant message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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()); - }; + /** + * Calls GetGenerator. + * @function getGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest} request GetGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a Variant message. - * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|createGenerator}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @typedef CreateGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} [response] Generator + */ - /** - * Creates a Variant message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant} Variant - */ - Variant.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3beta1.Generator, request, callback); + }, "name", { value: "CreateGenerator" }); - /** - * Creates a plain object from a Variant message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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; - }; + /** + * Calls CreateGenerator. + * @function createGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest} request CreateGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this Variant to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant - * @instance - * @returns {Object.} JSON object - */ - Variant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|updateGenerator}. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @typedef UpdateGeneratorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} [response] Generator + */ - /** - * Gets the default type url for Variant - * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VersionVariants.Variant"; - }; + /** + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateGeneratorRequest, $root.google.cloud.dialogflow.cx.v3beta1.Generator, request, callback); + }, "name", { value: "UpdateGenerator" }); - return Variant; - })(); + /** + * Calls UpdateGenerator. + * @function updateGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest} request UpdateGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return VersionVariants; + /** + * Callback as used by {@link google.cloud.dialogflow.cx.v3beta1.Generators|deleteGenerator}. + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object + * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteGeneratorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGenerator" }); + + /** + * Calls DeleteGenerator. + * @function deleteGenerator + * @memberof google.cloud.dialogflow.cx.v3beta1.Generators + * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest} request DeleteGeneratorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Generators; })(); - v3beta1.RolloutConfig = (function() { + v3beta1.Generator = (function() { /** - * Properties of a RolloutConfig. + * Properties of a Generator. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IRolloutConfig - * @property {Array.|null} [rolloutSteps] RolloutConfig rolloutSteps - * @property {string|null} [rolloutCondition] RolloutConfig rolloutCondition - * @property {string|null} [failureCondition] RolloutConfig failureCondition + * @interface IGenerator + * @property {string|null} [name] Generator name + * @property {string|null} [displayName] Generator displayName + * @property {google.cloud.dialogflow.cx.v3beta1.IPhrase|null} [promptText] Generator promptText + * @property {Array.|null} [placeholders] Generator placeholders */ /** - * Constructs a new RolloutConfig. + * Constructs a new Generator. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a RolloutConfig. - * @implements IRolloutConfig + * @classdesc Represents a Generator. + * @implements IGenerator * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerator=} [properties] Properties to set */ - function RolloutConfig(properties) { - this.rolloutSteps = []; + function Generator(properties) { + this.placeholders = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -151581,106 +162331,120 @@ } /** - * RolloutConfig rolloutSteps. - * @member {Array.} rolloutSteps - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * Generator name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @instance */ - RolloutConfig.prototype.rolloutSteps = $util.emptyArray; + Generator.prototype.name = ""; /** - * RolloutConfig rolloutCondition. - * @member {string} rolloutCondition - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * Generator displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @instance */ - RolloutConfig.prototype.rolloutCondition = ""; + Generator.prototype.displayName = ""; /** - * RolloutConfig failureCondition. - * @member {string} failureCondition - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * Generator promptText. + * @member {google.cloud.dialogflow.cx.v3beta1.IPhrase|null|undefined} promptText + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @instance */ - RolloutConfig.prototype.failureCondition = ""; + Generator.prototype.promptText = null; /** - * Creates a new RolloutConfig instance using the specified properties. + * Generator placeholders. + * @member {Array.} placeholders + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator + * @instance + */ + Generator.prototype.placeholders = $util.emptyArray; + + /** + * Creates a new Generator instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig} RolloutConfig instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerator=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator} Generator instance */ - RolloutConfig.create = function create(properties) { - return new RolloutConfig(properties); + Generator.create = function create(properties) { + return new Generator(properties); }; /** - * Encodes the specified RolloutConfig message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.verify|verify} messages. + * Encodes the specified Generator message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Generator.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerator} message Generator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutConfig.encode = function encode(message, writer) { + Generator.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.v3beta1.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.promptText != null && Object.hasOwnProperty.call(message, "promptText")) + $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generator.Placeholder.encode(message.placeholders[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified RolloutConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.verify|verify} messages. + * Encodes the specified Generator message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Generator.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutConfig} message RolloutConfig message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGenerator} message Generator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutConfig.encodeDelimited = function encodeDelimited(message, writer) { + Generator.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RolloutConfig message from the specified reader or buffer. + * Decodes a Generator message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator} Generator * @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) { + Generator.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Generator(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.rolloutSteps && message.rolloutSteps.length)) - message.rolloutSteps = []; - message.rolloutSteps.push($root.google.cloud.dialogflow.cx.v3beta1.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.promptText = $root.google.cloud.dialogflow.cx.v3beta1.Phrase.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.placeholders && message.placeholders.length)) + message.placeholders = []; + message.placeholders.push($root.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.decode(reader, reader.uint32())); break; } default: @@ -151692,156 +162456,168 @@ }; /** - * Decodes a RolloutConfig message from the specified reader or buffer, length delimited. + * Decodes a Generator message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator} Generator * @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) { + Generator.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RolloutConfig message. + * Verifies a Generator message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @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) { + Generator.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.v3beta1.RolloutConfig.RolloutStep.verify(message.rolloutSteps[i]); + 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.v3beta1.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.v3beta1.Generator.Placeholder.verify(message.placeholders[i]); if (error) - return "rolloutSteps." + error; + return "placeholders." + 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 Generator message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig} RolloutConfig + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator} Generator */ - RolloutConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig) + Generator.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Generator) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig(); - if (object.rolloutSteps) { - if (!Array.isArray(object.rolloutSteps)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.rolloutSteps: object expected"); - message.rolloutSteps[i] = $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep.fromObject(object.rolloutSteps[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generator.promptText: object expected"); + message.promptText = $root.google.cloud.dialogflow.cx.v3beta1.Phrase.fromObject(object.promptText); + } + if (object.placeholders) { + if (!Array.isArray(object.placeholders)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generator.placeholders: object expected"); + message.placeholders[i] = $root.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.fromObject(object.placeholders[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. + * Creates a plain object from a Generator message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig} message RolloutConfig + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} message Generator * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RolloutConfig.toObject = function toObject(message, options) { + Generator.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rolloutSteps = []; + object.placeholders = []; if (options.defaults) { - object.rolloutCondition = ""; - object.failureCondition = ""; + object.name = ""; + object.displayName = ""; + object.promptText = null; } - 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.v3beta1.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.promptText != null && message.hasOwnProperty("promptText")) + object.promptText = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Generator.Placeholder.toObject(message.placeholders[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. + * Converts this Generator to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @instance * @returns {Object.} JSON object */ - RolloutConfig.prototype.toJSON = function toJSON() { + Generator.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RolloutConfig + * Gets the default type url for Generator * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RolloutConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Generator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RolloutConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Generator"; }; - RolloutConfig.RolloutStep = (function() { + Generator.Placeholder = (function() { /** - * Properties of a RolloutStep. - * @memberof google.cloud.dialogflow.cx.v3beta1.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 a Placeholder. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator + * @interface IPlaceholder + * @property {string|null} [id] Placeholder id + * @property {string|null} [name] Placeholder name */ /** - * Constructs a new RolloutStep. - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig - * @classdesc Represents a RolloutStep. - * @implements IRolloutStep + * Constructs a new Placeholder. + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator + * @classdesc Represents a Placeholder. + * @implements IPlaceholder * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder=} [properties] Properties to set */ - function RolloutStep(properties) { + function Placeholder(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -151849,103 +162625,89 @@ } /** - * RolloutStep displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep - * @instance - */ - RolloutStep.prototype.displayName = ""; - - /** - * RolloutStep trafficPercent. - * @member {number} trafficPercent - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * Placeholder id. + * @member {string} id + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @instance */ - RolloutStep.prototype.trafficPercent = 0; + Placeholder.prototype.id = ""; /** - * RolloutStep minDuration. - * @member {google.protobuf.IDuration|null|undefined} minDuration - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * Placeholder name. + * @member {string} name + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @instance */ - RolloutStep.prototype.minDuration = null; + Placeholder.prototype.name = ""; /** - * Creates a new RolloutStep instance using the specified properties. + * Creates a new Placeholder instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep} RolloutStep instance + * @param {google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder} Placeholder instance */ - RolloutStep.create = function create(properties) { - return new RolloutStep(properties); + Placeholder.create = function create(properties) { + return new Placeholder(properties); }; /** - * Encodes the specified RolloutStep message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep.verify|verify} messages. + * Encodes the specified Placeholder message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder} message Placeholder message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutStep.encode = function encode(message, writer) { + Placeholder.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.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 RolloutStep message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep.verify|verify} messages. + * Encodes the specified Placeholder message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.IRolloutStep} message RolloutStep message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.Generator.IPlaceholder} message Placeholder message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RolloutStep.encodeDelimited = function encodeDelimited(message, writer) { + Placeholder.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RolloutStep message from the specified reader or buffer. + * Decodes a Placeholder message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder} Placeholder * @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) { + Placeholder.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.displayName = reader.string(); + message.id = reader.string(); break; } case 2: { - message.trafficPercent = reader.int32(); - break; - } - case 3: { - message.minDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -151957,507 +162719,210 @@ }; /** - * Decodes a RolloutStep message from the specified reader or buffer, length delimited. + * Decodes a Placeholder message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder} Placeholder * @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) { + Placeholder.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RolloutStep message. + * Verifies a Placeholder message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @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) { + Placeholder.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.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 RolloutStep message from a plain object. Also converts values to their respective internal types. + * Creates a Placeholder message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep} RolloutStep + * @returns {google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder} Placeholder */ - RolloutStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep) + Placeholder.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutConfig.RolloutStep.minDuration: object expected"); - message.minDuration = $root.google.protobuf.Duration.fromObject(object.minDuration); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 RolloutStep message. Also converts values to other types if specified. + * Creates a plain object from a Placeholder message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static - * @param {google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep} message RolloutStep + * @param {google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder} message Placeholder * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RolloutStep.toObject = function toObject(message, options) { + Placeholder.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.displayName = ""; - object.trafficPercent = 0; - object.minDuration = null; + object.id = ""; + object.name = ""; } - 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 (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 RolloutStep to JSON. + * Converts this Placeholder to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @instance * @returns {Object.} JSON object */ - RolloutStep.prototype.toJSON = function toJSON() { + Placeholder.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 Placeholder * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + * @memberof google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RolloutStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Placeholder.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder"; }; - return RolloutStep; + return Placeholder; })(); - return RolloutConfig; - })(); - - v3beta1.RolloutState = (function() { - - /** - * Properties of a RolloutState. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @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.v3beta1 - * @classdesc Represents a RolloutState. - * @implements IRolloutState - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState - * @instance - */ - RolloutState.prototype.step = ""; - - /** - * RolloutState stepIndex. - * @member {number} stepIndex - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState - * @instance - */ - RolloutState.prototype.stepIndex = 0; - - /** - * RolloutState startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState - * @instance - */ - RolloutState.prototype.startTime = null; - - /** - * Creates a new RolloutState instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IRolloutState=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.RolloutState.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.RolloutState(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.RolloutState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutState - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.RolloutState} RolloutState - */ - RolloutState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.RolloutState) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.RolloutState - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.RolloutState"; - }; - - return RolloutState; + return Generator; })(); - v3beta1.VariantsHistory = (function() { + v3beta1.Phrase = (function() { /** - * Properties of a VariantsHistory. + * Properties of a Phrase. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IVariantsHistory - * @property {google.cloud.dialogflow.cx.v3beta1.IVersionVariants|null} [versionVariants] VariantsHistory versionVariants - * @property {google.protobuf.ITimestamp|null} [updateTime] VariantsHistory updateTime + * @interface IPhrase + * @property {string|null} [text] Phrase text */ /** - * Constructs a new VariantsHistory. + * Constructs a new Phrase. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a VariantsHistory. - * @implements IVariantsHistory + * @classdesc Represents a Phrase. + * @implements IPhrase * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.IVersionVariants|null|undefined} versionVariants - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory - * @instance - */ - VariantsHistory.prototype.versionVariants = null; - - /** - * VariantsHistory updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory - * @instance + * @param {google.cloud.dialogflow.cx.v3beta1.IPhrase=} [properties] Properties to set */ - VariantsHistory.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + 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]]; + } /** - * VariantsHistory variants. - * @member {"versionVariants"|undefined} variants - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * Phrase text. + * @member {string} text + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @instance */ - Object.defineProperty(VariantsHistory.prototype, "variants", { - get: $util.oneOfGetter($oneOfFields = ["versionVariants"]), - set: $util.oneOfSetter($oneOfFields) - }); + Phrase.prototype.text = ""; /** - * Creates a new VariantsHistory instance using the specified properties. + * Creates a new Phrase instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory instance + * @param {google.cloud.dialogflow.cx.v3beta1.IPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.Phrase} Phrase instance */ - VariantsHistory.create = function create(properties) { - return new VariantsHistory(properties); + Phrase.create = function create(properties) { + return new Phrase(properties); }; /** - * Encodes the specified VariantsHistory message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * Encodes the specified Phrase message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Phrase.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPhrase} message Phrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VariantsHistory.encode = function encode(message, writer) { + Phrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.versionVariants != null && Object.hasOwnProperty.call(message, "versionVariants")) - $root.google.cloud.dialogflow.cx.v3beta1.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.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified VariantsHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.VariantsHistory.verify|verify} messages. + * Encodes the specified Phrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.Phrase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IVariantsHistory} message VariantsHistory message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IPhrase} message Phrase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VariantsHistory.encodeDelimited = function encodeDelimited(message, writer) { + Phrase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VariantsHistory message from the specified reader or buffer. + * Decodes a Phrase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3beta1.Phrase} Phrase * @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) { + Phrase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.Phrase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.text = reader.string(); break; } default: @@ -152469,148 +162934,125 @@ }; /** - * Decodes a VariantsHistory 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.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3beta1.Phrase} Phrase * @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) { + Phrase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VariantsHistory message. + * Verifies a Phrase message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @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) { + Phrase.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.v3beta1.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.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a VariantsHistory 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.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} VariantsHistory + * @returns {google.cloud.dialogflow.cx.v3beta1.Phrase} Phrase */ - VariantsHistory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory) + Phrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.Phrase) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.VariantsHistory(); - if (object.versionVariants != null) { - if (typeof object.versionVariants !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VariantsHistory.versionVariants: object expected"); - message.versionVariants = $root.google.cloud.dialogflow.cx.v3beta1.VersionVariants.fromObject(object.versionVariants); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.VariantsHistory.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.dialogflow.cx.v3beta1.Phrase(); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a VariantsHistory 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.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static - * @param {google.cloud.dialogflow.cx.v3beta1.VariantsHistory} message VariantsHistory + * @param {google.cloud.dialogflow.cx.v3beta1.Phrase} message Phrase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VariantsHistory.toObject = function toObject(message, options) { + Phrase.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.v3beta1.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.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this VariantsHistory to JSON. + * Converts this Phrase to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @instance * @returns {Object.} JSON object */ - VariantsHistory.prototype.toJSON = function toJSON() { + Phrase.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 Phrase * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.VariantsHistory + * @memberof google.cloud.dialogflow.cx.v3beta1.Phrase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VariantsHistory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Phrase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.VariantsHistory"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.Phrase"; }; - return VariantsHistory; + return Phrase; })(); - v3beta1.ListExperimentsRequest = (function() { + v3beta1.ListGeneratorsRequest = (function() { /** - * Properties of a ListExperimentsRequest. + * Properties of a ListGeneratorsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListExperimentsRequest - * @property {string|null} [parent] ListExperimentsRequest parent - * @property {number|null} [pageSize] ListExperimentsRequest pageSize - * @property {string|null} [pageToken] ListExperimentsRequest pageToken + * @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 ListExperimentsRequest. + * Constructs a new ListGeneratorsRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListExperimentsRequest. - * @implements IListExperimentsRequest + * @classdesc Represents a ListGeneratorsRequest. + * @implements IListGeneratorsRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest=} [properties] Properties to set */ - function ListExperimentsRequest(properties) { + function ListGeneratorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -152618,90 +163060,100 @@ } /** - * ListExperimentsRequest parent. + * ListGeneratorsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @instance */ - ListExperimentsRequest.prototype.parent = ""; + ListGeneratorsRequest.prototype.parent = ""; /** - * ListExperimentsRequest pageSize. + * ListGeneratorsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest + * @instance + */ + ListGeneratorsRequest.prototype.languageCode = ""; + + /** + * ListGeneratorsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @instance */ - ListExperimentsRequest.prototype.pageSize = 0; + ListGeneratorsRequest.prototype.pageSize = 0; /** - * ListExperimentsRequest pageToken. + * ListGeneratorsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @instance */ - ListExperimentsRequest.prototype.pageToken = ""; + ListGeneratorsRequest.prototype.pageToken = ""; /** - * Creates a new ListExperimentsRequest instance using the specified properties. + * Creates a new ListGeneratorsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest} ListGeneratorsRequest instance */ - ListExperimentsRequest.create = function create(properties) { - return new ListExperimentsRequest(properties); + ListGeneratorsRequest.create = function create(properties) { + return new ListGeneratorsRequest(properties); }; /** - * Encodes the specified ListExperimentsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. + * Encodes the specified ListGeneratorsRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExperimentsRequest.encode = function encode(message, 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 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 ListExperimentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest.verify|verify} messages. + * Encodes the specified ListGeneratorsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsRequest} message ListExperimentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest} message ListGeneratorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExperimentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGeneratorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsRequest} ListExperimentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest} ListGeneratorsRequest * @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) { + ListGeneratorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -152710,10 +163162,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; } @@ -152726,35 +163182,38 @@ }; /** - * Decodes a ListExperimentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest} ListGeneratorsRequest * @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) { + ListGeneratorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExperimentsRequest message. + * Verifies a ListGeneratorsRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @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) { + 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"; @@ -152765,19 +163224,21 @@ }; /** - * Creates a ListExperimentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} ListExperimentsRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest} ListGeneratorsRequest */ - ListExperimentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest) + ListGeneratorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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) @@ -152786,25 +163247,28 @@ }; /** - * Creates a plain object from a ListExperimentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGeneratorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest} message ListExperimentsRequest + * @param {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest} message ListGeneratorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExperimentsRequest.toObject = function toObject(message, options) { + 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")) @@ -152813,54 +163277,54 @@ }; /** - * Converts this ListExperimentsRequest to JSON. + * Converts this ListGeneratorsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @instance * @returns {Object.} JSON object */ - ListExperimentsRequest.prototype.toJSON = function toJSON() { + ListGeneratorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListExperimentsRequest + * Gets the default type url for ListGeneratorsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListExperimentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGeneratorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest"; }; - return ListExperimentsRequest; + return ListGeneratorsRequest; })(); - v3beta1.ListExperimentsResponse = (function() { + v3beta1.ListGeneratorsResponse = (function() { /** - * Properties of a ListExperimentsResponse. + * Properties of a ListGeneratorsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IListExperimentsResponse - * @property {Array.|null} [experiments] ListExperimentsResponse experiments - * @property {string|null} [nextPageToken] ListExperimentsResponse nextPageToken + * @interface IListGeneratorsResponse + * @property {Array.|null} [generators] ListGeneratorsResponse generators + * @property {string|null} [nextPageToken] ListGeneratorsResponse nextPageToken */ /** - * Constructs a new ListExperimentsResponse. + * Constructs a new ListGeneratorsResponse. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a ListExperimentsResponse. - * @implements IListExperimentsResponse + * @classdesc Represents a ListGeneratorsResponse. + * @implements IListGeneratorsResponse * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse=} [properties] Properties to set */ - function ListExperimentsResponse(properties) { - this.experiments = []; + function ListGeneratorsResponse(properties) { + this.generators = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -152868,88 +163332,88 @@ } /** - * ListExperimentsResponse experiments. - * @member {Array.} experiments - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * ListGeneratorsResponse generators. + * @member {Array.} generators + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @instance */ - ListExperimentsResponse.prototype.experiments = $util.emptyArray; + ListGeneratorsResponse.prototype.generators = $util.emptyArray; /** - * ListExperimentsResponse nextPageToken. + * ListGeneratorsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @instance */ - ListExperimentsResponse.prototype.nextPageToken = ""; + ListGeneratorsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListExperimentsResponse instance using the specified properties. + * Creates a new ListGeneratorsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse instance + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} ListGeneratorsResponse instance */ - ListExperimentsResponse.create = function create(properties) { - return new ListExperimentsResponse(properties); + ListGeneratorsResponse.create = function create(properties) { + return new ListGeneratorsResponse(properties); }; /** - * Encodes the specified ListExperimentsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. + * Encodes the specified ListGeneratorsResponse message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExperimentsResponse.encode = function encode(message, writer) { + ListGeneratorsResponse.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.v3beta1.Experiment.encode(message.experiments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generators != null && message.generators.length) + for (var i = 0; i < message.generators.length; ++i) + $root.google.cloud.dialogflow.cx.v3beta1.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 ListExperimentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.verify|verify} messages. + * Encodes the specified ListGeneratorsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IListExperimentsResponse} message ListExperimentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse} message ListGeneratorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListExperimentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListGeneratorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse} ListExperimentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} ListGeneratorsResponse * @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) { + ListGeneratorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.experiments && message.experiments.length)) - message.experiments = []; - message.experiments.push($root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32())); + if (!(message.generators && message.generators.length)) + message.generators = []; + message.generators.push($root.google.cloud.dialogflow.cx.v3beta1.Generator.decode(reader, reader.uint32())); break; } case 2: { @@ -152965,39 +163429,39 @@ }; /** - * Decodes a ListExperimentsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListGeneratorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} ListGeneratorsResponse * @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) { + ListGeneratorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListExperimentsResponse message. + * Verifies a ListGeneratorsResponse message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @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) { + ListGeneratorsResponse.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.v3beta1.Experiment.verify(message.experiments[i]); + 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.v3beta1.Generator.verify(message.generators[i]); if (error) - return "experiments." + error; + return "generators." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -153007,25 +163471,25 @@ }; /** - * Creates a ListExperimentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListGeneratorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} ListExperimentsResponse + * @returns {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} ListGeneratorsResponse */ - ListExperimentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse) + ListGeneratorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse(); - if (object.experiments) { - if (!Array.isArray(object.experiments)) - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListExperimentsResponse.experiments: object expected"); - message.experiments[i] = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiments[i]); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse(); + if (object.generators) { + if (!Array.isArray(object.generators)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ListGeneratorsResponse.generators: object expected"); + message.generators[i] = $root.google.cloud.dialogflow.cx.v3beta1.Generator.fromObject(object.generators[i]); } } if (object.nextPageToken != null) @@ -153034,26 +163498,26 @@ }; /** - * Creates a plain object from a ListExperimentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListGeneratorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse} message ListExperimentsResponse + * @param {google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse} message ListGeneratorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListExperimentsResponse.toObject = function toObject(message, options) { + ListGeneratorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.experiments = []; + object.generators = []; 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.v3beta1.Experiment.toObject(message.experiments[j], options); + 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.v3beta1.Generator.toObject(message.generators[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -153061,52 +163525,53 @@ }; /** - * Converts this ListExperimentsResponse to JSON. + * Converts this ListGeneratorsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @instance * @returns {Object.} JSON object */ - ListExperimentsResponse.prototype.toJSON = function toJSON() { + ListGeneratorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListExperimentsResponse + * Gets the default type url for ListGeneratorsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + * @memberof google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListExperimentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGeneratorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse"; }; - return ListExperimentsResponse; + return ListGeneratorsResponse; })(); - v3beta1.GetExperimentRequest = (function() { + v3beta1.GetGeneratorRequest = (function() { /** - * Properties of a GetExperimentRequest. + * Properties of a GetGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IGetExperimentRequest - * @property {string|null} [name] GetExperimentRequest name + * @interface IGetGeneratorRequest + * @property {string|null} [name] GetGeneratorRequest name + * @property {string|null} [languageCode] GetGeneratorRequest languageCode */ /** - * Constructs a new GetExperimentRequest. + * Constructs a new GetGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a GetExperimentRequest. - * @implements IGetExperimentRequest + * @classdesc Represents a GetGeneratorRequest. + * @implements IGetGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest=} [properties] Properties to set */ - function GetExperimentRequest(properties) { + function GetGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -153114,70 +163579,80 @@ } /** - * GetExperimentRequest name. + * GetGeneratorRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @instance */ - GetExperimentRequest.prototype.name = ""; + GetGeneratorRequest.prototype.name = ""; /** - * Creates a new GetExperimentRequest instance using the specified properties. + * GetGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest + * @instance + */ + GetGeneratorRequest.prototype.languageCode = ""; + + /** + * Creates a new GetGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest} GetGeneratorRequest instance */ - GetExperimentRequest.create = function create(properties) { - return new GetExperimentRequest(properties); + GetGeneratorRequest.create = function create(properties) { + return new GetGeneratorRequest(properties); }; /** - * Encodes the specified GetExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. + * Encodes the specified GetGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExperimentRequest.encode = function encode(message, 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 GetExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest.verify|verify} messages. + * Encodes the specified GetGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IGetExperimentRequest} message GetExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest} message GetGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer. + * Decodes a GetGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest} GetGeneratorRequest * @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) { + GetGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -153185,6 +163660,10 @@ message.name = reader.string(); break; } + case 2: { + message.languageCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -153194,123 +163673,133 @@ }; /** - * Decodes a GetExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest} GetGeneratorRequest * @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) { + GetGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetExperimentRequest message. + * Verifies a GetGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @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) { + 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 GetExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} GetExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest} GetGeneratorRequest */ - GetExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest) + GetGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 GetExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest} message GetExperimentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest} message GetGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetExperimentRequest.toObject = function toObject(message, options) { + GetGeneratorRequest.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 GetExperimentRequest to JSON. + * Converts this GetGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @instance * @returns {Object.} JSON object */ - GetExperimentRequest.prototype.toJSON = function toJSON() { + GetGeneratorRequest.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 GetGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest"; }; - return GetExperimentRequest; + return GetGeneratorRequest; })(); - v3beta1.CreateExperimentRequest = (function() { + v3beta1.CreateGeneratorRequest = (function() { /** - * Properties of a CreateExperimentRequest. + * Properties of a CreateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface ICreateExperimentRequest - * @property {string|null} [parent] CreateExperimentRequest parent - * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] CreateExperimentRequest experiment + * @interface ICreateGeneratorRequest + * @property {string|null} [parent] CreateGeneratorRequest parent + * @property {google.cloud.dialogflow.cx.v3beta1.IGenerator|null} [generator] CreateGeneratorRequest generator + * @property {string|null} [languageCode] CreateGeneratorRequest languageCode */ /** - * Constructs a new CreateExperimentRequest. + * Constructs a new CreateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a CreateExperimentRequest. - * @implements ICreateExperimentRequest + * @classdesc Represents a CreateGeneratorRequest. + * @implements ICreateGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest=} [properties] Properties to set */ - function CreateExperimentRequest(properties) { + function CreateGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -153318,80 +163807,90 @@ } /** - * CreateExperimentRequest parent. + * CreateGeneratorRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @instance */ - CreateExperimentRequest.prototype.parent = ""; + CreateGeneratorRequest.prototype.parent = ""; /** - * CreateExperimentRequest experiment. - * @member {google.cloud.dialogflow.cx.v3beta1.IExperiment|null|undefined} experiment - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * CreateGeneratorRequest generator. + * @member {google.cloud.dialogflow.cx.v3beta1.IGenerator|null|undefined} generator + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @instance */ - CreateExperimentRequest.prototype.experiment = null; + CreateGeneratorRequest.prototype.generator = null; /** - * Creates a new CreateExperimentRequest instance using the specified properties. + * CreateGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest + * @instance + */ + CreateGeneratorRequest.prototype.languageCode = ""; + + /** + * Creates a new CreateGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest} CreateGeneratorRequest instance */ - CreateExperimentRequest.create = function create(properties) { - return new CreateExperimentRequest(properties); + CreateGeneratorRequest.create = function create(properties) { + return new CreateGeneratorRequest(properties); }; /** - * Encodes the specified CreateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. + * Encodes the specified CreateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExperimentRequest.encode = function encode(message, 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.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - $root.google.cloud.dialogflow.cx.v3beta1.Experiment.encode(message.experiment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) + $root.google.cloud.dialogflow.cx.v3beta1.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 CreateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.verify|verify} messages. + * Encodes the specified CreateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.ICreateExperimentRequest} message CreateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest} message CreateGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest} CreateGeneratorRequest * @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) { + CreateGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -153400,7 +163899,11 @@ break; } case 2: { - message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32()); + message.generator = $root.google.cloud.dialogflow.cx.v3beta1.Generator.decode(reader, reader.uint32()); + break; + } + case 3: { + message.languageCode = reader.string(); break; } default: @@ -153412,137 +163915,146 @@ }; /** - * Decodes a CreateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest} CreateGeneratorRequest * @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) { + CreateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateExperimentRequest message. + * Verifies a CreateGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @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) { + 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.experiment != null && message.hasOwnProperty("experiment")) { - var error = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.verify(message.experiment); + if (message.generator != null && message.hasOwnProperty("generator")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Generator.verify(message.generator); if (error) - return "experiment." + error; + return "generator." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a CreateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} CreateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest} CreateGeneratorRequest */ - CreateExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest) + CreateGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.experiment != null) { - if (typeof object.experiment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.experiment: object expected"); - message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiment); + if (object.generator != null) { + if (typeof object.generator !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest.generator: object expected"); + message.generator = $root.google.cloud.dialogflow.cx.v3beta1.Generator.fromObject(object.generator); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a CreateExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest} message CreateExperimentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest} message CreateGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateExperimentRequest.toObject = function toObject(message, options) { + CreateGeneratorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.experiment = null; + object.generator = null; + object.languageCode = ""; } 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.v3beta1.Experiment.toObject(message.experiment, options); + if (message.generator != null && message.hasOwnProperty("generator")) + object.generator = $root.google.cloud.dialogflow.cx.v3beta1.Generator.toObject(message.generator, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this CreateExperimentRequest to JSON. + * Converts this CreateGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @instance * @returns {Object.} JSON object */ - CreateExperimentRequest.prototype.toJSON = function toJSON() { + CreateGeneratorRequest.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 CreateGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest"; }; - return CreateExperimentRequest; + return CreateGeneratorRequest; })(); - v3beta1.UpdateExperimentRequest = (function() { + v3beta1.UpdateGeneratorRequest = (function() { /** - * Properties of an UpdateExperimentRequest. + * Properties of an UpdateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IUpdateExperimentRequest - * @property {google.cloud.dialogflow.cx.v3beta1.IExperiment|null} [experiment] UpdateExperimentRequest experiment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExperimentRequest updateMask + * @interface IUpdateGeneratorRequest + * @property {google.cloud.dialogflow.cx.v3beta1.IGenerator|null} [generator] UpdateGeneratorRequest generator + * @property {string|null} [languageCode] UpdateGeneratorRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGeneratorRequest updateMask */ /** - * Constructs a new UpdateExperimentRequest. + * Constructs a new UpdateGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents an UpdateExperimentRequest. - * @implements IUpdateExperimentRequest + * @classdesc Represents an UpdateGeneratorRequest. + * @implements IUpdateGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest=} [properties] Properties to set */ - function UpdateExperimentRequest(properties) { + function UpdateGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -153550,88 +164062,102 @@ } /** - * UpdateExperimentRequest experiment. - * @member {google.cloud.dialogflow.cx.v3beta1.IExperiment|null|undefined} experiment - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * UpdateGeneratorRequest generator. + * @member {google.cloud.dialogflow.cx.v3beta1.IGenerator|null|undefined} generator + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @instance */ - UpdateExperimentRequest.prototype.experiment = null; + UpdateGeneratorRequest.prototype.generator = null; /** - * UpdateExperimentRequest updateMask. + * UpdateGeneratorRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest + * @instance + */ + UpdateGeneratorRequest.prototype.languageCode = ""; + + /** + * UpdateGeneratorRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @instance */ - UpdateExperimentRequest.prototype.updateMask = null; + UpdateGeneratorRequest.prototype.updateMask = null; /** - * Creates a new UpdateExperimentRequest instance using the specified properties. + * Creates a new UpdateGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest} UpdateGeneratorRequest instance */ - UpdateExperimentRequest.create = function create(properties) { - return new UpdateExperimentRequest(properties); + UpdateGeneratorRequest.create = function create(properties) { + return new UpdateGeneratorRequest(properties); }; /** - * Encodes the specified UpdateExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * Encodes the specified UpdateGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExperimentRequest.encode = function encode(message, writer) { + UpdateGeneratorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) - $root.google.cloud.dialogflow.cx.v3beta1.Experiment.encode(message.experiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) + $root.google.cloud.dialogflow.cx.v3beta1.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 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 UpdateExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.verify|verify} messages. + * Encodes the specified UpdateGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateExperimentRequest} message UpdateExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest} message UpdateGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer. + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest} UpdateGeneratorRequest * @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) { + UpdateGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.decode(reader, reader.uint32()); + message.generator = $root.google.cloud.dialogflow.cx.v3beta1.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; } @@ -153644,37 +164170,40 @@ }; /** - * Decodes an UpdateExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest} UpdateGeneratorRequest * @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) { + UpdateGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExperimentRequest message. + * Verifies an UpdateGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @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) { + UpdateGeneratorRequest.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.v3beta1.Experiment.verify(message.experiment); + if (message.generator != null && message.hasOwnProperty("generator")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.Generator.verify(message.generator); if (error) - return "experiment." + 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) @@ -153684,101 +164213,107 @@ }; /** - * Creates an UpdateExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} UpdateExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest} UpdateGeneratorRequest */ - UpdateExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest) + UpdateGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest(); - if (object.experiment != null) { - if (typeof object.experiment !== "object") - throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.experiment: object expected"); - message.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.fromObject(object.experiment); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest(); + if (object.generator != null) { + if (typeof object.generator !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.generator: object expected"); + message.generator = $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.UpdateExperimentRequest.updateMask: object expected"); + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest.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. + * Creates a plain object from an UpdateGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest} message UpdateExperimentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest} message UpdateGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExperimentRequest.toObject = function toObject(message, options) { + UpdateGeneratorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.experiment = null; + object.generator = null; + object.languageCode = ""; object.updateMask = null; } - if (message.experiment != null && message.hasOwnProperty("experiment")) - object.experiment = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.toObject(message.experiment, options); + if (message.generator != null && message.hasOwnProperty("generator")) + object.generator = $root.google.cloud.dialogflow.cx.v3beta1.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 UpdateExperimentRequest to JSON. + * Converts this UpdateGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @instance * @returns {Object.} JSON object */ - UpdateExperimentRequest.prototype.toJSON = function toJSON() { + UpdateGeneratorRequest.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 UpdateGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest"; }; - return UpdateExperimentRequest; + return UpdateGeneratorRequest; })(); - v3beta1.DeleteExperimentRequest = (function() { + v3beta1.DeleteGeneratorRequest = (function() { /** - * Properties of a DeleteExperimentRequest. + * Properties of a DeleteGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IDeleteExperimentRequest - * @property {string|null} [name] DeleteExperimentRequest name + * @interface IDeleteGeneratorRequest + * @property {string|null} [name] DeleteGeneratorRequest name + * @property {boolean|null} [force] DeleteGeneratorRequest force */ /** - * Constructs a new DeleteExperimentRequest. + * Constructs a new DeleteGeneratorRequest. * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a DeleteExperimentRequest. - * @implements IDeleteExperimentRequest + * @classdesc Represents a DeleteGeneratorRequest. + * @implements IDeleteGeneratorRequest * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest=} [properties] Properties to set */ - function DeleteExperimentRequest(properties) { + function DeleteGeneratorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -153786,273 +164321,80 @@ } /** - * DeleteExperimentRequest name. + * DeleteGeneratorRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - * @instance - */ - DeleteExperimentRequest.prototype.name = ""; - - /** - * Creates a new DeleteExperimentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteExperimentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteExperimentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.v3beta1.DeleteExperimentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.DeleteExperimentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest} DeleteExperimentRequest - */ - DeleteExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.DeleteExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @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.v3beta1.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.v3beta1.DeleteExperimentRequest"; - }; - - return DeleteExperimentRequest; - })(); - - v3beta1.StartExperimentRequest = (function() { - - /** - * Properties of a StartExperimentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IStartExperimentRequest - * @property {string|null} [name] StartExperimentRequest name - */ - - /** - * Constructs a new StartExperimentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a StartExperimentRequest. - * @implements IStartExperimentRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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]]; - } + DeleteGeneratorRequest.prototype.name = ""; /** - * StartExperimentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * DeleteGeneratorRequest force. + * @member {boolean} force + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @instance */ - StartExperimentRequest.prototype.name = ""; + DeleteGeneratorRequest.prototype.force = false; /** - * Creates a new StartExperimentRequest instance using the specified properties. + * Creates a new DeleteGeneratorRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest instance + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest} DeleteGeneratorRequest instance */ - StartExperimentRequest.create = function create(properties) { - return new StartExperimentRequest(properties); + DeleteGeneratorRequest.create = function create(properties) { + return new DeleteGeneratorRequest(properties); }; /** - * Encodes the specified StartExperimentRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * Encodes the specified DeleteGeneratorRequest message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartExperimentRequest.encode = function encode(message, 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 StartExperimentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest.verify|verify} messages. + * Encodes the specified DeleteGeneratorRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IStartExperimentRequest} message StartExperimentRequest message or plain object to encode + * @param {google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest} message DeleteGeneratorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartExperimentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteGeneratorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartExperimentRequest message from the specified reader or buffer. + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StartExperimentRequest} StartExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest} DeleteGeneratorRequest * @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) { + DeleteGeneratorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -154060,207 +164402,8 @@ 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.v3beta1.StartExperimentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.StartExperimentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest} StartExperimentRequest - */ - StartExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest) - return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StartExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.StartExperimentRequest"; - }; - - return StartExperimentRequest; - })(); - - v3beta1.StopExperimentRequest = (function() { - - /** - * Properties of a StopExperimentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @interface IStopExperimentRequest - * @property {string|null} [name] StopExperimentRequest name - */ - - /** - * Constructs a new StopExperimentRequest. - * @memberof google.cloud.dialogflow.cx.v3beta1 - * @classdesc Represents a StopExperimentRequest. - * @implements IStopExperimentRequest - * @constructor - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StopExperimentRequest - * @instance - */ - StopExperimentRequest.prototype.name = ""; - - /** - * Creates a new StopExperimentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.IStopExperimentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StopExperimentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.StopExperimentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest - * @static - * @param {google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 2: { + message.force = reader.bool(); break; } default: @@ -154272,102 +164415,111 @@ }; /** - * Decodes a StopExperimentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteGeneratorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest} DeleteGeneratorRequest * @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) { + DeleteGeneratorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopExperimentRequest message. + * Verifies a DeleteGeneratorRequest message. * @function verify - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @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) { + 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 StopExperimentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGeneratorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} StopExperimentRequest + * @returns {google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest} DeleteGeneratorRequest */ - StopExperimentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest) + DeleteGeneratorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest) return object; - var message = new $root.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest(); + var message = new $root.google.cloud.dialogflow.cx.v3beta1.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 StopExperimentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteGeneratorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static - * @param {google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest} message StopExperimentRequest + * @param {google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest} message DeleteGeneratorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopExperimentRequest.toObject = function toObject(message, options) { + DeleteGeneratorRequest.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 DeleteGeneratorRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @instance * @returns {Object.} JSON object */ - StopExperimentRequest.prototype.toJSON = function toJSON() { + DeleteGeneratorRequest.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 DeleteGeneratorRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + * @memberof google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopExperimentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteGeneratorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest"; }; - return StopExperimentRequest; + return DeleteGeneratorRequest; })(); v3beta1.SecuritySettingsService = (function() { diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index 3debb6dfcce..780d02d4d7d 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -412,6 +412,13 @@ "options": { "proto3_optional": true } + }, + "answerFeedbackSettings": { + "type": "AnswerFeedbackSettings", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -467,6 +474,17 @@ } } } + }, + "AnswerFeedbackSettings": { + "fields": { + "enableAnswerFeedback": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -835,6 +853,18 @@ } } }, + "BargeInConfig": { + "fields": { + "noBargeInDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "totalDuration": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, "InputAudioConfig": { "fields": { "audioEncoding": { @@ -868,6 +898,10 @@ "singleUtterance": { "type": "bool", "id": 8 + }, + "bargeInConfig": { + "type": "BargeInConfig", + "id": 15 } } }, @@ -2858,24 +2892,6 @@ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListEntityTypes": { - "requestType": "ListEntityTypesRequest", - "responseType": "ListEntityTypesResponse", - "options": { - "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, "GetEntityType": { "requestType": "GetEntityTypeRequest", "responseType": "EntityType", @@ -2951,6 +2967,24 @@ "(google.api.method_signature)": "name" } ] + }, + "ListEntityTypes": { + "requestType": "ListEntityTypesRequest", + "responseType": "ListEntityTypesResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -5409,6 +5443,108 @@ } } ] + }, + "SubmitAnswerFeedback": { + "requestType": "SubmitAnswerFeedbackRequest", + "responseType": "AnswerFeedback", + "options": { + "(google.api.http).post": "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + "body": "*" + } + } + ] + } + } + }, + "AnswerFeedback": { + "fields": { + "rating": { + "type": "Rating", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ratingReason": { + "type": "RatingReason", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customRating": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Rating": { + "values": { + "RATING_UNSPECIFIED": 0, + "THUMBS_UP": 1, + "THUMBS_DOWN": 2 + } + }, + "RatingReason": { + "fields": { + "reasonLabels": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "feedback": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SubmitAnswerFeedbackRequest": { + "fields": { + "session": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Session" + } + }, + "responseId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "answerFeedback": { + "type": "AnswerFeedback", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -5721,6 +5857,113 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "endUserMetadata": { + "type": "google.protobuf.Struct", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "searchConfig": { + "type": "SearchConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchConfig": { + "fields": { + "boostSpecs": { + "rule": "repeated", + "type": "BoostSpecs", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterSpecs": { + "rule": "repeated", + "type": "FilterSpecs", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BoostSpec": { + "fields": { + "conditionBoostSpecs": { + "rule": "repeated", + "type": "ConditionBoostSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ConditionBoostSpec": { + "fields": { + "condition": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "boost": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "BoostSpecs": { + "fields": { + "dataStores": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "spec": { + "rule": "repeated", + "type": "BoostSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FilterSpecs": { + "fields": { + "dataStores": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -5858,6 +6101,10 @@ "advancedSettings": { "type": "AdvancedSettings", "id": 21 + }, + "allowAnswerFeedback": { + "type": "bool", + "id": 32 } } }, @@ -7789,43 +8036,41 @@ } } }, - "SecuritySettingsService": { + "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/*}" } }, { @@ -7833,28 +8078,302 @@ } ] }, - "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", + "UpdateGenerator": { + "requestType": "UpdateGeneratorRequest", + "responseType": "Generator", + "options": { + "(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)": { + "patch": "/v3/{generator.name=projects/*/locations/*/agents/*/generators/*}", + "body": "generator" + } + }, + { + "(google.api.method_signature)": "generator,update_mask" + } + ] + }, + "DeleteGenerator": { + "requestType": "DeleteGeneratorRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "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" + } + } + }, + "nested": { + "Placeholder": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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 + } + } + }, + "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", @@ -8898,6 +9417,13 @@ "options": { "proto3_optional": true } + }, + "answerFeedbackSettings": { + "type": "AnswerFeedbackSettings", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -8953,6 +9479,17 @@ } } } + }, + "AnswerFeedbackSettings": { + "fields": { + "enableAnswerFeedback": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -9321,6 +9858,18 @@ } } }, + "BargeInConfig": { + "fields": { + "noBargeInDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "totalDuration": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, "InputAudioConfig": { "fields": { "audioEncoding": { @@ -9354,6 +9903,10 @@ "singleUtterance": { "type": "bool", "id": 8 + }, + "bargeInConfig": { + "type": "BargeInConfig", + "id": 15 } } }, @@ -11332,24 +11885,6 @@ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListEntityTypes": { - "requestType": "ListEntityTypesRequest", - "responseType": "ListEntityTypesResponse", - "options": { - "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, "GetEntityType": { "requestType": "GetEntityTypeRequest", "responseType": "EntityType", @@ -11425,6 +11960,24 @@ "(google.api.method_signature)": "name" } ] + }, + "ListEntityTypes": { + "requestType": "ListEntityTypesRequest", + "responseType": "ListEntityTypesResponse", + "options": { + "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -13883,6 +14436,108 @@ } } ] + }, + "SubmitAnswerFeedback": { + "requestType": "SubmitAnswerFeedbackRequest", + "responseType": "AnswerFeedback", + "options": { + "(google.api.http).post": "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:submitAnswerFeedback", + "body": "*" + } + } + ] + } + } + }, + "AnswerFeedback": { + "fields": { + "rating": { + "type": "Rating", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ratingReason": { + "type": "RatingReason", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customRating": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Rating": { + "values": { + "RATING_UNSPECIFIED": 0, + "THUMBS_UP": 1, + "THUMBS_DOWN": 2 + } + }, + "RatingReason": { + "fields": { + "reasonLabels": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "feedback": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SubmitAnswerFeedbackRequest": { + "fields": { + "session": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Session" + } + }, + "responseId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "answerFeedback": { + "type": "AnswerFeedback", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -14159,39 +14814,146 @@ }, "currentPage": { "type": "string", - "id": 6, + "id": 6, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Page" + } + }, + "disableWebhook": { + "type": "bool", + "id": 7 + }, + "analyzeQueryTextSentiment": { + "type": "bool", + "id": 8 + }, + "webhookHeaders": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "flowVersions": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" + } + }, + "channel": { + "type": "string", + "id": 15 + }, + "sessionTtl": { + "type": "google.protobuf.Duration", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endUserMetadata": { + "type": "google.protobuf.Struct", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "searchConfig": { + "type": "SearchConfig", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchConfig": { + "fields": { + "boostSpecs": { + "rule": "repeated", + "type": "BoostSpecs", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterSpecs": { + "rule": "repeated", + "type": "FilterSpecs", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BoostSpec": { + "fields": { + "conditionBoostSpecs": { + "rule": "repeated", + "type": "ConditionBoostSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ConditionBoostSpec": { + "fields": { + "condition": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "boost": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "BoostSpecs": { + "fields": { + "dataStores": { + "rule": "repeated", + "type": "string", + "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Page" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" } }, - "disableWebhook": { - "type": "bool", - "id": 7 - }, - "analyzeQueryTextSentiment": { - "type": "bool", - "id": 8 - }, - "webhookHeaders": { - "keyType": "string", - "type": "string", - "id": 10 - }, - "flowVersions": { + "spec": { + "rule": "repeated", + "type": "BoostSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FilterSpecs": { + "fields": { + "dataStores": { "rule": "repeated", "type": "string", - "id": 14, + "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" } }, - "channel": { + "filter": { "type": "string", - "id": 15 - }, - "sessionTtl": { - "type": "google.protobuf.Duration", - "id": 16, + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } @@ -14332,6 +15094,10 @@ "advancedSettings": { "type": "AdvancedSettings", "id": 21 + }, + "allowAnswerFeedback": { + "type": "bool", + "id": 32 } } }, @@ -16263,6 +17029,278 @@ } } }, + "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": { + "ListGenerators": { + "requestType": "ListGeneratorsRequest", + "responseType": "ListGeneratorsResponse", + "options": { + "(google.api.http).get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetGenerator": { + "requestType": "GetGeneratorRequest", + "responseType": "Generator", + "options": { + "(google.api.http).get": "/v3beta1/{name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3beta1/{name=projects/*/locations/*/agents/*/generators/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateGenerator": { + "requestType": "CreateGeneratorRequest", + "responseType": "Generator", + "options": { + "(google.api.http).post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators", + "(google.api.http).body": "generator", + "(google.api.method_signature)": "parent,generator" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3beta1/{parent=projects/*/locations/*/agents/*}/generators", + "body": "generator" + } + }, + { + "(google.api.method_signature)": "parent,generator" + } + ] + }, + "UpdateGenerator": { + "requestType": "UpdateGeneratorRequest", + "responseType": "Generator", + "options": { + "(google.api.http).patch": "/v3beta1/{generator.name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.http).body": "generator", + "(google.api.method_signature)": "generator,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3beta1/{generator.name=projects/*/locations/*/agents/*/generators/*}", + "body": "generator" + } + }, + { + "(google.api.method_signature)": "generator,update_mask" + } + ] + }, + "DeleteGenerator": { + "requestType": "DeleteGeneratorRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3beta1/{name=projects/*/locations/*/agents/*/generators/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3beta1/{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" + } + } + }, + "nested": { + "Placeholder": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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 + } + } + }, "SecuritySettingsService": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", diff --git a/packages/google-cloud-dialogflow-cx/samples/README.md b/packages/google-cloud-dialogflow-cx/samples/README.md index 5bd02282628..0cad64d8d44 100644 --- a/packages/google-cloud-dialogflow-cx/samples/README.md +++ b/packages/google-cloud-dialogflow-cx/samples/README.md @@ -58,6 +58,11 @@ * [Flows.train_flow](#flows.train_flow) * [Flows.update_flow](#flows.update_flow) * [Flows.validate_flow](#flows.validate_flow) + * [Generators.create_generator](#generators.create_generator) + * [Generators.delete_generator](#generators.delete_generator) + * [Generators.get_generator](#generators.get_generator) + * [Generators.list_generators](#generators.list_generators) + * [Generators.update_generator](#generators.update_generator) * [Intents.create_intent](#intents.create_intent) * [Intents.delete_intent](#intents.delete_intent) * [Intents.export_intents](#intents.export_intents) @@ -84,6 +89,7 @@ * [Sessions.fulfill_intent](#sessions.fulfill_intent) * [Sessions.match_intent](#sessions.match_intent) * [Sessions.streaming_detect_intent](#sessions.streaming_detect_intent) + * [Sessions.submit_answer_feedback](#sessions.submit_answer_feedback) * [Test_cases.batch_delete_test_cases](#test_cases.batch_delete_test_cases) * [Test_cases.batch_run_test_cases](#test_cases.batch_run_test_cases) * [Test_cases.calculate_coverage](#test_cases.calculate_coverage) @@ -159,6 +165,11 @@ * [Flows.train_flow](#flows.train_flow) * [Flows.update_flow](#flows.update_flow) * [Flows.validate_flow](#flows.validate_flow) + * [Generators.create_generator](#generators.create_generator) + * [Generators.delete_generator](#generators.delete_generator) + * [Generators.get_generator](#generators.get_generator) + * [Generators.list_generators](#generators.list_generators) + * [Generators.update_generator](#generators.update_generator) * [Intents.create_intent](#intents.create_intent) * [Intents.delete_intent](#intents.delete_intent) * [Intents.export_intents](#intents.export_intents) @@ -185,6 +196,7 @@ * [Sessions.fulfill_intent](#sessions.fulfill_intent) * [Sessions.match_intent](#sessions.match_intent) * [Sessions.streaming_detect_intent](#sessions.streaming_detect_intent) + * [Sessions.submit_answer_feedback](#sessions.submit_answer_feedback) * [Test_cases.batch_delete_test_cases](#test_cases.batch_delete_test_cases) * [Test_cases.batch_run_test_cases](#test_cases.batch_run_test_cases) * [Test_cases.calculate_coverage](#test_cases.calculate_coverage) @@ -1013,6 +1025,91 @@ __Usage:__ +### Generators.create_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js` + + +----- + + + + +### Generators.delete_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js` + + +----- + + + + +### Generators.get_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js` + + +----- + + + + +### Generators.list_generators + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js` + + +----- + + + + +### Generators.update_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js` + + +----- + + + + ### Intents.create_intent View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js). @@ -1455,6 +1552,23 @@ __Usage:__ +### Sessions.submit_answer_feedback + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js` + + +----- + + + + ### Test_cases.batch_delete_test_cases View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js). @@ -2730,6 +2844,91 @@ __Usage:__ +### Generators.create_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js` + + +----- + + + + +### Generators.delete_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js` + + +----- + + + + +### Generators.get_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js` + + +----- + + + + +### Generators.list_generators + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js` + + +----- + + + + +### Generators.update_generator + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js` + + +----- + + + + ### Intents.create_intent View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js). @@ -3172,6 +3371,23 @@ __Usage:__ +### Sessions.submit_answer_feedback + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js` + + +----- + + + + ### Test_cases.batch_delete_test_cases View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js). diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js new file mode 100644 index 00000000000..6caa07b1ea0 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.create_generator.js @@ -0,0 +1,73 @@ +// Copyright 2023 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, generator) { + // [START dialogflow_v3_generated_Generators_CreateGenerator_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 generator for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * Required. The generator to create. + */ + // const generator = {} + /** + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + */ + // const languageCode = 'abc123' + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callCreateGenerator() { + // Construct request + const request = { + parent, + generator, + }; + + // Run request + const response = await cxClient.createGenerator(request); + console.log(response); + } + + callCreateGenerator(); + // [END dialogflow_v3_generated_Generators_CreateGenerator_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/generators.delete_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js new file mode 100644 index 00000000000..8ad01c94604 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.delete_generator.js @@ -0,0 +1,73 @@ +// Copyright 2023 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_Generators_DeleteGenerator_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 generator to delete. + * Format: `projects//locations//agents//generators/`. + */ + // const name = 'abc123' + /** + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * 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 generator, as well + * as any references to the generator (i.e. + * Generator Fulfillment.generator) in fulfillments. + */ + // const force = true + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callDeleteGenerator() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deleteGenerator(request); + console.log(response); + } + + callDeleteGenerator(); + // [END dialogflow_v3_generated_Generators_DeleteGenerator_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/generators.get_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js new file mode 100644 index 00000000000..dd91ac2d092 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.get_generator.js @@ -0,0 +1,67 @@ +// Copyright 2023 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_Generators_GetGenerator_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 generator. + * Format: `projects//locations//agents//generators/`. + */ + // const name = 'abc123' + /** + * The language to list generators for. + */ + // const languageCode = 'abc123' + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callGetGenerator() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getGenerator(request); + console.log(response); + } + + callGetGenerator(); + // [END dialogflow_v3_generated_Generators_GetGenerator_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/generators.list_generators.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js new file mode 100644 index 00000000000..c13d4cb45e1 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.list_generators.js @@ -0,0 +1,77 @@ +// Copyright 2023 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_Generators_ListGenerators_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 all generators for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * The language to list generators for. + */ + // const languageCode = '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 {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callListGenerators() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await cxClient.listGeneratorsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListGenerators(); + // [END dialogflow_v3_generated_Generators_ListGenerators_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/generators.update_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js new file mode 100644 index 00000000000..3979557733c --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/generators.update_generator.js @@ -0,0 +1,70 @@ +// Copyright 2023 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(generator) { + // [START dialogflow_v3_generated_Generators_UpdateGenerator_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 generator to update. + */ + // const generator = {} + /** + * The language to list generators for. + */ + // const languageCode = 'abc123' + /** + * 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 {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callUpdateGenerator() { + // Construct request + const request = { + generator, + }; + + // Run request + const response = await cxClient.updateGenerator(request); + console.log(response); + } + + callUpdateGenerator(); + // [END dialogflow_v3_generated_Generators_UpdateGenerator_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.submit_answer_feedback.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js new file mode 100644 index 00000000000..e2a73a7ddac --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.submit_answer_feedback.js @@ -0,0 +1,77 @@ +// Copyright 2023 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(session, responseId, answerFeedback) { + // [START dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_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 session the feedback was sent to. + */ + // const session = 'abc123' + /** + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + */ + // const responseId = 'abc123' + /** + * Required. Feedback provided for a bot answer. + */ + // const answerFeedback = {} + /** + * Optional. The mask to control which fields to update. If the mask is not + * present, all fields will be updated. + */ + // const updateMask = {} + + // Imports the Cx library + const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; + + // Instantiates a client + const cxClient = new SessionsClient(); + + async function callSubmitAnswerFeedback() { + // Construct request + const request = { + session, + responseId, + answerFeedback, + }; + + // Run request + const response = await cxClient.submitAnswerFeedback(request); + console.log(response); + } + + callSubmitAnswerFeedback(); + // [END dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_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/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 ccaf728a3d3..d1fb8b2a0a3 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 @@ -699,58 +699,6 @@ } } }, - { - "regionTag": "dialogflow_v3_generated_EntityTypes_ListEntityTypes_async", - "title": "Agents listEntityTypes Sample", - "origin": "API_DEFINITION", - "description": " Returns the list of all entity types in the specified agent.", - "canonical": true, - "file": "entity_types.list_entity_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse", - "client": { - "shortName": "EntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3.EntityTypesClient" - }, - "method": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes", - "service": { - "shortName": "EntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes" - } - } - } - }, { "regionTag": "dialogflow_v3_generated_EntityTypes_GetEntityType_async", "title": "Agents getEntityType Sample", @@ -935,6 +883,58 @@ } } }, + { + "regionTag": "dialogflow_v3_generated_EntityTypes_ListEntityTypes_async", + "title": "Agents listEntityTypes Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all entity types in the specified agent.", + "canonical": true, + "file": "entity_types.list_entity_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListEntityTypesResponse", + "client": { + "shortName": "EntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3.EntityTypesClient" + }, + "method": { + "shortName": "ListEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes", + "service": { + "shortName": "EntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3.EntityTypes" + } + } + } + }, { "regionTag": "dialogflow_v3_generated_Environments_ListEnvironments_async", "title": "Agents listEnvironments Sample", @@ -2095,6 +2095,242 @@ } } }, + { + "regionTag": "dialogflow_v3_generated_Generators_ListGenerators_async", + "title": "Agents listGenerators Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all generators in the specified agent.", + "canonical": true, + "file": "generators.list_generators.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.ListGenerators", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.ListGeneratorsResponse", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.ListGenerators", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Generators_GetGenerator_async", + "title": "Agents getGenerator Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the specified generator.", + "canonical": true, + "file": "generators.get_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.GetGenerator", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.GetGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Generators_CreateGenerator_async", + "title": "Agents createGenerator Sample", + "origin": "API_DEFINITION", + "description": " Creates a generator in the specified agent.", + "canonical": true, + "file": "generators.create_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.CreateGenerator", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "generator", + "type": ".google.cloud.dialogflow.cx.v3.Generator" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.CreateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Generators_UpdateGenerator_async", + "title": "Agents updateGenerator Sample", + "origin": "API_DEFINITION", + "description": " Update the specified generator.", + "canonical": true, + "file": "generators.update_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator", + "async": true, + "parameters": [ + { + "name": "generator", + "type": ".google.cloud.dialogflow.cx.v3.Generator" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.UpdateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3_generated_Generators_DeleteGenerator_async", + "title": "Agents deleteGenerator Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified generators.", + "canonical": true, + "file": "generators.delete_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3.GeneratorsClient" + }, + "method": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3.Generators.DeleteGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3.Generators" + } + } + } + }, { "regionTag": "dialogflow_v3_generated_Intents_ListIntents_async", "title": "Agents listIntents Sample", @@ -3319,6 +3555,58 @@ } } }, + { + "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", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js new file mode 100644 index 00000000000..8f6e169119b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.create_generator.js @@ -0,0 +1,73 @@ +// Copyright 2023 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, generator) { + // [START dialogflow_v3beta1_generated_Generators_CreateGenerator_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 generator for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * Required. The generator to create. + */ + // const generator = {} + /** + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is used. + */ + // const languageCode = 'abc123' + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callCreateGenerator() { + // Construct request + const request = { + parent, + generator, + }; + + // Run request + const response = await cxClient.createGenerator(request); + console.log(response); + } + + callCreateGenerator(); + // [END dialogflow_v3beta1_generated_Generators_CreateGenerator_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/v3beta1/generators.delete_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js new file mode 100644 index 00000000000..6783225920b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.delete_generator.js @@ -0,0 +1,73 @@ +// Copyright 2023 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_v3beta1_generated_Generators_DeleteGenerator_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 generator to delete. + * Format: `projects//locations//agents//generators/`. + */ + // const name = 'abc123' + /** + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * * 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 generator, as well + * as any references to the generator (i.e. + * Generator Fulfillment.generator) in fulfillments. + */ + // const force = true + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callDeleteGenerator() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.deleteGenerator(request); + console.log(response); + } + + callDeleteGenerator(); + // [END dialogflow_v3beta1_generated_Generators_DeleteGenerator_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/v3beta1/generators.get_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js new file mode 100644 index 00000000000..2588300ce34 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.get_generator.js @@ -0,0 +1,67 @@ +// Copyright 2023 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_v3beta1_generated_Generators_GetGenerator_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 generator. + * Format: `projects//locations//agents//generators/`. + */ + // const name = 'abc123' + /** + * The language to list generators for. + */ + // const languageCode = 'abc123' + + // Imports the Cx library + const {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callGetGenerator() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cxClient.getGenerator(request); + console.log(response); + } + + callGetGenerator(); + // [END dialogflow_v3beta1_generated_Generators_GetGenerator_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/v3beta1/generators.list_generators.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js new file mode 100644 index 00000000000..1b9acae4e45 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.list_generators.js @@ -0,0 +1,77 @@ +// Copyright 2023 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_v3beta1_generated_Generators_ListGenerators_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 all generators for. + * Format: `projects//locations//agents/`. + */ + // const parent = 'abc123' + /** + * The language to list generators for. + */ + // const languageCode = '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 {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callListGenerators() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await cxClient.listGeneratorsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListGenerators(); + // [END dialogflow_v3beta1_generated_Generators_ListGenerators_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/v3beta1/generators.update_generator.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js new file mode 100644 index 00000000000..77dff09f444 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/generators.update_generator.js @@ -0,0 +1,70 @@ +// Copyright 2023 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(generator) { + // [START dialogflow_v3beta1_generated_Generators_UpdateGenerator_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 generator to update. + */ + // const generator = {} + /** + * The language to list generators for. + */ + // const languageCode = 'abc123' + /** + * 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 {GeneratorsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new GeneratorsClient(); + + async function callUpdateGenerator() { + // Construct request + const request = { + generator, + }; + + // Run request + const response = await cxClient.updateGenerator(request); + console.log(response); + } + + callUpdateGenerator(); + // [END dialogflow_v3beta1_generated_Generators_UpdateGenerator_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/v3beta1/sessions.submit_answer_feedback.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js new file mode 100644 index 00000000000..745c09b1642 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.submit_answer_feedback.js @@ -0,0 +1,77 @@ +// Copyright 2023 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(session, responseId, answerFeedback) { + // [START dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_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 session the feedback was sent to. + */ + // const session = 'abc123' + /** + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + */ + // const responseId = 'abc123' + /** + * Required. Feedback provided for a bot answer. + */ + // const answerFeedback = {} + /** + * Optional. The mask to control which fields to update. If the mask is not + * present, all fields will be updated. + */ + // const updateMask = {} + + // Imports the Cx library + const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3beta1; + + // Instantiates a client + const cxClient = new SessionsClient(); + + async function callSubmitAnswerFeedback() { + // Construct request + const request = { + session, + responseId, + answerFeedback, + }; + + // Run request + const response = await cxClient.submitAnswerFeedback(request); + console.log(response); + } + + callSubmitAnswerFeedback(); + // [END dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_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/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json index d496ae301ce..064607c4317 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json @@ -699,58 +699,6 @@ } } }, - { - "regionTag": "dialogflow_v3beta1_generated_EntityTypes_ListEntityTypes_async", - "title": "Agents listEntityTypes Sample", - "origin": "API_DEFINITION", - "description": " Returns the list of all entity types in the specified agent.", - "canonical": true, - "file": "entity_types.list_entity_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse", - "client": { - "shortName": "EntityTypesClient", - "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypesClient" - }, - "method": { - "shortName": "ListEntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes", - "service": { - "shortName": "EntityTypes", - "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes" - } - } - } - }, { "regionTag": "dialogflow_v3beta1_generated_EntityTypes_GetEntityType_async", "title": "Agents getEntityType Sample", @@ -935,6 +883,58 @@ } } }, + { + "regionTag": "dialogflow_v3beta1_generated_EntityTypes_ListEntityTypes_async", + "title": "Agents listEntityTypes Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all entity types in the specified agent.", + "canonical": true, + "file": "entity_types.list_entity_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse", + "client": { + "shortName": "EntityTypesClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypesClient" + }, + "method": { + "shortName": "ListEntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes", + "service": { + "shortName": "EntityTypes", + "fullName": "google.cloud.dialogflow.cx.v3beta1.EntityTypes" + } + } + } + }, { "regionTag": "dialogflow_v3beta1_generated_Environments_ListEnvironments_async", "title": "Agents listEnvironments Sample", @@ -2095,6 +2095,242 @@ } } }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_ListGenerators_async", + "title": "Agents listGenerators Sample", + "origin": "API_DEFINITION", + "description": " Returns the list of all generators in the specified agent.", + "canonical": true, + "file": "generators.list_generators.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "ListGenerators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.ListGenerators", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_GetGenerator_async", + "title": "Agents getGenerator Sample", + "origin": "API_DEFINITION", + "description": " Retrieves the specified generator.", + "canonical": true, + "file": "generators.get_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "GetGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.GetGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_CreateGenerator_async", + "title": "Agents createGenerator Sample", + "origin": "API_DEFINITION", + "description": " Creates a generator in the specified agent.", + "canonical": true, + "file": "generators.create_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "generator", + "type": ".google.cloud.dialogflow.cx.v3beta1.Generator" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "CreateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.CreateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_UpdateGenerator_async", + "title": "Agents updateGenerator Sample", + "origin": "API_DEFINITION", + "description": " Update the specified generator.", + "canonical": true, + "file": "generators.update_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator", + "async": true, + "parameters": [ + { + "name": "generator", + "type": ".google.cloud.dialogflow.cx.v3beta1.Generator" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.Generator", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "UpdateGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.UpdateGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + } + }, + { + "regionTag": "dialogflow_v3beta1_generated_Generators_DeleteGenerator_async", + "title": "Agents deleteGenerator Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified generators.", + "canonical": true, + "file": "generators.delete_generator.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "GeneratorsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.GeneratorsClient" + }, + "method": { + "shortName": "DeleteGenerator", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators.DeleteGenerator", + "service": { + "shortName": "Generators", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Generators" + } + } + } + }, { "regionTag": "dialogflow_v3beta1_generated_Intents_ListIntents_async", "title": "Agents listIntents Sample", @@ -3319,6 +3555,58 @@ } } }, + { + "regionTag": "dialogflow_v3beta1_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.v3beta1.Sessions.SubmitAnswerFeedback", + "async": true, + "parameters": [ + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "response_id", + "type": "TYPE_STRING" + }, + { + "name": "answer_feedback", + "type": ".google.cloud.dialogflow.cx.v3beta1.AnswerFeedback" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.dialogflow.cx.v3beta1.AnswerFeedback", + "client": { + "shortName": "SessionsClient", + "fullName": "google.cloud.dialogflow.cx.v3beta1.SessionsClient" + }, + "method": { + "shortName": "SubmitAnswerFeedback", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Sessions.SubmitAnswerFeedback", + "service": { + "shortName": "Sessions", + "fullName": "google.cloud.dialogflow.cx.v3beta1.Sessions" + } + } + } + }, { "regionTag": "dialogflow_v3beta1_generated_TestCases_ListTestCases_async", "title": "Agents listTestCases Sample", diff --git a/packages/google-cloud-dialogflow-cx/src/index.ts b/packages/google-cloud-dialogflow-cx/src/index.ts index 16e83a21bee..4a35bbd2697 100644 --- a/packages/google-cloud-dialogflow-cx/src/index.ts +++ b/packages/google-cloud-dialogflow-cx/src/index.ts @@ -33,6 +33,8 @@ const ExperimentsClient = v3.ExperimentsClient; type ExperimentsClient = v3.ExperimentsClient; const FlowsClient = v3.FlowsClient; type FlowsClient = v3.FlowsClient; +const GeneratorsClient = v3.GeneratorsClient; +type GeneratorsClient = v3.GeneratorsClient; const IntentsClient = v3.IntentsClient; type IntentsClient = v3.IntentsClient; const PagesClient = v3.PagesClient; @@ -62,6 +64,7 @@ export { EnvironmentsClient, ExperimentsClient, FlowsClient, + GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, @@ -82,6 +85,7 @@ export default { EnvironmentsClient, ExperimentsClient, FlowsClient, + GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, 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 7b5495ce525..dec0f6001b2 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts @@ -220,6 +220,9 @@ export class AgentsClient { 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}' ), @@ -2840,6 +2843,76 @@ export class AgentsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 2df661d1569..54d4022800c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/changelogs_client.ts @@ -219,6 +219,9 @@ export class ChangelogsClient { 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}' ), @@ -1850,6 +1853,76 @@ export class ChangelogsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 46a112f2159..190e8d2180c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/deployments_client.ts @@ -219,6 +219,9 @@ export class DeploymentsClient { 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}' ), @@ -1796,6 +1799,76 @@ export class DeploymentsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 e9bbda2df3c..c1efe4d5b67 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 @@ -219,6 +219,9 @@ export class EntityTypesClient { 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}' ), @@ -373,11 +376,11 @@ export class EntityTypesClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const entityTypesStubMethods = [ - 'listEntityTypes', 'getEntityType', 'createEntityType', 'updateEntityType', 'deleteEntityType', + 'listEntityTypes', ]; for (const methodName of entityTypesStubMethods) { const callPromise = this.entityTypesStub.then( @@ -2171,6 +2174,76 @@ export class EntityTypesClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client_config.json index 7add64f1153..b9c4624d9fe 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/entity_types_client_config.json @@ -23,11 +23,6 @@ } }, "methods": { - "ListEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, "GetEntityType": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -47,6 +42,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "ListEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 5716aecbb53..9515eec5d85 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts @@ -221,6 +221,9 @@ export class EnvironmentsClient { 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}' ), @@ -2957,6 +2960,76 @@ export class EnvironmentsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 d632797ebb0..1faef5f72ca 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/experiments_client.ts @@ -219,6 +219,9 @@ export class ExperimentsClient { 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}' ), @@ -2274,6 +2277,76 @@ export class ExperimentsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 1a49a079c28..1166f2f752d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts @@ -220,6 +220,9 @@ export class FlowsClient { 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}' ), @@ -2889,6 +2892,76 @@ export class FlowsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 86f93e19725..38ae5f200ac 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/gapic_metadata.json @@ -599,6 +599,74 @@ } } }, + "Generators": { + "clients": { + "grpc": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "GetGenerator": { + "methods": [ + "getGenerator" + ] + }, + "CreateGenerator": { + "methods": [ + "createGenerator" + ] + }, + "UpdateGenerator": { + "methods": [ + "updateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "deleteGenerator" + ] + }, + "ListGenerators": { + "methods": [ + "listGenerators", + "listGeneratorsStream", + "listGeneratorsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "GetGenerator": { + "methods": [ + "getGenerator" + ] + }, + "CreateGenerator": { + "methods": [ + "createGenerator" + ] + }, + "UpdateGenerator": { + "methods": [ + "updateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "deleteGenerator" + ] + }, + "ListGenerators": { + "methods": [ + "listGenerators", + "listGeneratorsStream", + "listGeneratorsAsync" + ] + } + } + } + } + }, "Intents": { "clients": { "grpc": { @@ -911,6 +979,11 @@ "fulfillIntent" ] }, + "SubmitAnswerFeedback": { + "methods": [ + "submitAnswerFeedback" + ] + }, "StreamingDetectIntent": { "methods": [ "streamingDetectIntent" @@ -935,6 +1008,11 @@ "methods": [ "fulfillIntent" ] + }, + "SubmitAnswerFeedback": { + "methods": [ + "submitAnswerFeedback" + ] } } } diff --git a/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts new file mode 100644 index 00000000000..9a4c2a8e2ee --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_client.ts @@ -0,0 +1,3167 @@ +// Copyright 2023 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'); +/** + * Client JSON configuration object, loaded from + * `src/v3/generators_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './generators_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing {@link protos.google.cloud.dialogflow.cx.v3.Generator|Generators} + * @class + * @memberof v3 + */ +export class GeneratorsClient { + 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}; + 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; + generatorsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of GeneratorsClient. + * + * @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://developers.google.com/identity/protocols/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 GeneratorsClient({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 GeneratorsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.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 !== 'undefined' && '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}' + ), + 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}' + ), + 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}' + ), + projectLocationAgentFlowTransitionRouteGroupPathTemplate: + 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}' + ), + projectLocationAgentTransitionRouteGroupPathTemplate: + 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}' + ), + 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 = { + listGenerators: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'generators' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(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.Generators', + 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.generatorsStub) { + return this.generatorsStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3.Generators. + this.generatorsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dialogflow.cx.v3.Generators' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3.Generators, + 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 generatorsStubMethods = [ + 'listGenerators', + 'getGenerator', + 'createGenerator', + 'updateGenerator', + 'deleteGenerator', + ]; + for (const methodName of generatorsStubMethods) { + const callPromise = this.generatorsStub.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.generatorsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dialogflow.googleapis.com'; + } + + /** + * 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 -- + // ------------------- + /** + * Retrieves the specified generator. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the generator. + * Format: `projects//locations//agents//generators/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.Generator|Generator}. + * 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/generators.get_generator.js + * region_tag:dialogflow_v3_generated_Generators_GetGenerator_async + */ + getGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest | undefined, + {} | undefined, + ] + >; + getGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.IGetGeneratorRequest | 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(); + return this.innerApiCalls.getGenerator(request, options, callback); + } + /** + * Creates a generator in the specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. + * @param {google.cloud.dialogflow.cx.v3.Generator} request.generator + * Required. The generator to create. + * @param {string} request.languageCode + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is 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 an object representing {@link protos.google.cloud.dialogflow.cx.v3.Generator|Generator}. + * 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/generators.create_generator.js + * region_tag:dialogflow_v3_generated_Generators_CreateGenerator_async + */ + createGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest | undefined, + {} | undefined, + ] + >; + createGenerator( + request: protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGenerator( + request: protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.ICreateGeneratorRequest | 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(); + return this.innerApiCalls.createGenerator(request, options, callback); + } + /** + * Update the specified generator. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3.Generator} request.generator + * Required. The generator to update. + * @param {string} request.languageCode + * The language to list generators for. + * @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.Generator|Generator}. + * 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/generators.update_generator.js + * region_tag:dialogflow_v3_generated_Generators_UpdateGenerator_async + */ + updateGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest | undefined, + {} | undefined, + ] + >; + updateGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IGenerator, + | protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator, + protos.google.cloud.dialogflow.cx.v3.IUpdateGeneratorRequest | 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({ + 'generator.name': request.generator!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGenerator(request, options, callback); + } + /** + * Deletes the specified generators. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the generator to delete. + * Format: `projects//locations//agents//generators/`. + * @param {boolean} request.force + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * + * * 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 generator, as well + * as any references to the generator (i.e. + * {@link protos.Fulfillment.generator|Generator}) in fulfillments. + * @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/generators.delete_generator.js + * region_tag:dialogflow_v3_generated_Generators_DeleteGenerator_async + */ + deleteGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest | undefined, + {} | undefined, + ] + >; + deleteGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGenerator( + request: protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGenerator( + request?: protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dialogflow.cx.v3.IDeleteGeneratorRequest | 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(); + return this.innerApiCalls.deleteGenerator(request, options, callback); + } + + /** + * Returns the list of all generators in the specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.Generator|Generator}. + * 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 `listGeneratorsAsync()` + * 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. + */ + listGenerators( + request?: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator[], + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest | null, + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, + ] + >; + listGenerators( + request: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IGenerator + > + ): void; + listGenerators( + request: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IGenerator + > + ): void; + listGenerators( + request?: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IGenerator + >, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3.IGenerator + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IGenerator[], + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest | null, + protos.google.cloud.dialogflow.cx.v3.IListGeneratorsResponse, + ] + > | 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(); + return this.innerApiCalls.listGenerators(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, 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 all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.Generator|Generator} 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 `listGeneratorsAsync()` + * 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. + */ + listGeneratorsStream( + request?: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + 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['listGenerators']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGenerators.createStream( + this.innerApiCalls.listGenerators as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listGenerators`, 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 all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.Generator|Generator}. 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/generators.list_generators.js + * region_tag:dialogflow_v3_generated_Generators_ListGenerators_async + */ + listGeneratorsAsync( + request?: protos.google.cloud.dialogflow.cx.v3.IListGeneratorsRequest, + 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['listGenerators']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGenerators.asyncIterate( + this.innerApiCalls['listGenerators'] 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, + options?: + | 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]> { + 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 { + 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, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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, + options?: + | 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 { + 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 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 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 projectLocationAgentFlowTransitionRouteGroup 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. + */ + projectLocationAgentFlowTransitionRouteGroupPath( + project: string, + location: string, + agent: string, + flow: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render( + { + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).agent; + } + + /** + * Parse the flow from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).flow; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).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 projectLocationAgentTransitionRouteGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentTransitionRouteGroupPath( + project: string, + location: string, + agent: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render( + { + project: project, + location: location, + agent: agent, + transition_route_group: transitionRouteGroup, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).agent; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).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 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.generatorsStub && !this._terminated) { + return this.generatorsStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3/generators_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/generators_client_config.json new file mode 100644 index 00000000000..5e8fe6c997b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3.Generators": { + "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": { + "ListGenerators": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} 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 new file mode 100644 index 00000000000..81549ae03b3 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3/generators_proto_list.json @@ -0,0 +1,30 @@ +[ + "../../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/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/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/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/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/index.ts b/packages/google-cloud-dialogflow-cx/src/v3/index.ts index 496a14d56ac..a0f0e112bfa 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/index.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/index.ts @@ -23,6 +23,7 @@ export {EntityTypesClient} from './entity_types_client'; export {EnvironmentsClient} from './environments_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 {SecuritySettingsServiceClient} from './security_settings_service_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 a1318089e1f..f178870b0a0 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/intents_client.ts @@ -220,6 +220,9 @@ export class IntentsClient { 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}' ), @@ -2503,6 +2506,76 @@ export class IntentsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 e0044f46230..5fd73c5326f 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/pages_client.ts @@ -219,6 +219,9 @@ export class PagesClient { 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}' ), @@ -2222,6 +2225,76 @@ export class PagesClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 2775df40fb4..cc63aed1a11 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 @@ -220,6 +220,9 @@ export class SecuritySettingsServiceClient { 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}' ), @@ -2132,6 +2135,76 @@ export class SecuritySettingsServiceClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 4335d9a9369..a87cd858789 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 @@ -220,6 +220,9 @@ export class SessionEntityTypesClient { 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}' ), @@ -2145,6 +2148,76 @@ export class SessionEntityTypesClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 176c1e6138a..715b9032b49 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client.ts @@ -220,6 +220,9 @@ export class SessionsClient { 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}' ), @@ -249,6 +252,13 @@ export class SessionsClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}' ), + projectLocationCollectionDataStorePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}' + ), + projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}' + ), securitySettingsPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/securitySettings/{security_settings}' ), @@ -377,6 +387,7 @@ export class SessionsClient { 'streamingDetectIntent', 'matchIntent', 'fulfillIntent', + 'submitAnswerFeedback', ]; for (const methodName of sessionsStubMethods) { const callPromise = this.sessionsStub.then( @@ -803,6 +814,111 @@ export class SessionsClient { this.initialize(); return this.innerApiCalls.fulfillIntent(request, options, callback); } + /** + * Updates the feedback received from the user for a single turn of the bot + * response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.session + * Required. The name of the session the feedback was sent to. + * @param {string} request.responseId + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * @param {google.cloud.dialogflow.cx.v3.AnswerFeedback} request.answerFeedback + * Required. Feedback provided for a bot answer. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The mask to control which fields to update. 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.AnswerFeedback|AnswerFeedback}. + * 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/sessions.submit_answer_feedback.js + * region_tag:dialogflow_v3_generated_Sessions_SubmitAnswerFeedback_async + */ + submitAnswerFeedback( + request?: protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + ( + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | undefined + ), + {} | undefined, + ] + >; + submitAnswerFeedback( + request: protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): void; + submitAnswerFeedback( + request: protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): void; + submitAnswerFeedback( + request?: protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback, + ( + | protos.google.cloud.dialogflow.cx.v3.ISubmitAnswerFeedbackRequest + | 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({ + session: request.session ?? '', + }); + this.initialize(); + return this.innerApiCalls.submitAnswerFeedback(request, options, callback); + } /** * Processes a natural language query in audio format in a streaming fashion @@ -1873,6 +1989,76 @@ export class SessionsClient { ).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. * @@ -2614,6 +2800,156 @@ export class SessionsClient { ).transition_route_group; } + /** + * Return a fully-qualified projectLocationCollectionDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStorePath( + project: string, + location: string, + collection: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationDataStorePath( + project: string, + location: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.render({ + project: project, + location: location, + data_store: dataStore, + }); + } + + /** + * Parse the project from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).data_store; + } + /** * Return a fully-qualified securitySettings resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client_config.json index 8c35ba4edc4..aaa1f6390cf 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/sessions_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/sessions_client_config.json @@ -42,6 +42,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "SubmitAnswerFeedback": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 7d1e595bb13..4de2bfa994d 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 @@ -221,6 +221,9 @@ export class TestCasesClient { 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}' ), @@ -3258,6 +3261,76 @@ export class TestCasesClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 af79f274a85..1608441542c 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 @@ -221,6 +221,9 @@ export class TransitionRouteGroupsClient { 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}' ), @@ -2237,6 +2240,76 @@ export class TransitionRouteGroupsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 f5863b862da..a43abfa5fff 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/versions_client.ts @@ -220,6 +220,9 @@ export class VersionsClient { 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}' ), @@ -2417,6 +2420,76 @@ export class VersionsClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", 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 42ee82a77f5..d69c42e08bd 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3/webhooks_client.ts @@ -219,6 +219,9 @@ export class WebhooksClient { 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}' ), @@ -2089,6 +2092,76 @@ export class WebhooksClient { ).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. * 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 e12637306c9..81549ae03b3 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 @@ -12,6 +12,7 @@ "../../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", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts index d82ab8d81f9..ffae205bf34 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client.ts @@ -220,6 +220,9 @@ export class AgentsClient { 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}' ), @@ -2854,6 +2857,76 @@ export class AgentsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts index 9e0cbcdead7..fc9d9e994f4 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_client.ts @@ -218,6 +218,9 @@ export class ChangelogsClient { 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}' ), @@ -1632,6 +1635,76 @@ export class ChangelogsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/changelogs_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts index 3b6e0ddcdd1..6f0fbc91cf6 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_client.ts @@ -218,6 +218,9 @@ export class DeploymentsClient { 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}' ), @@ -1578,6 +1581,76 @@ export class DeploymentsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/deployments_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts index 28bb04c6a98..5d216b4c79d 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client.ts @@ -218,6 +218,9 @@ export class EntityTypesClient { 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}' ), @@ -324,11 +327,11 @@ export class EntityTypesClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const entityTypesStubMethods = [ - 'listEntityTypes', 'getEntityType', 'createEntityType', 'updateEntityType', 'deleteEntityType', + 'listEntityTypes', ]; for (const methodName of entityTypesStubMethods) { const callPromise = this.entityTypesStub.then( @@ -1967,6 +1970,76 @@ export class EntityTypesClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client_config.json index fe9484a1c5b..f7919153704 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_client_config.json @@ -23,11 +23,6 @@ } }, "methods": { - "ListEntityTypes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, "GetEntityType": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -47,6 +42,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "ListEntityTypes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/entity_types_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts index bbd9af64d1a..9a9cff8b84a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_client.ts @@ -221,6 +221,9 @@ export class EnvironmentsClient { 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}' ), @@ -2965,6 +2968,76 @@ export class EnvironmentsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/environments_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts index 71265c7e022..b1a58ba0fbc 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_client.ts @@ -218,6 +218,9 @@ export class ExperimentsClient { 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}' ), @@ -2088,6 +2091,76 @@ export class ExperimentsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/experiments_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts index 8da38c64bdc..3edf4c73317 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_client.ts @@ -220,6 +220,9 @@ export class FlowsClient { 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}' ), @@ -2903,6 +2906,76 @@ export class FlowsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/flows_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/gapic_metadata.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/gapic_metadata.json index 98be972ba14..81d71a5a712 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/gapic_metadata.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/gapic_metadata.json @@ -599,6 +599,74 @@ } } }, + "Generators": { + "clients": { + "grpc": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "GetGenerator": { + "methods": [ + "getGenerator" + ] + }, + "CreateGenerator": { + "methods": [ + "createGenerator" + ] + }, + "UpdateGenerator": { + "methods": [ + "updateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "deleteGenerator" + ] + }, + "ListGenerators": { + "methods": [ + "listGenerators", + "listGeneratorsStream", + "listGeneratorsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "GeneratorsClient", + "rpcs": { + "GetGenerator": { + "methods": [ + "getGenerator" + ] + }, + "CreateGenerator": { + "methods": [ + "createGenerator" + ] + }, + "UpdateGenerator": { + "methods": [ + "updateGenerator" + ] + }, + "DeleteGenerator": { + "methods": [ + "deleteGenerator" + ] + }, + "ListGenerators": { + "methods": [ + "listGenerators", + "listGeneratorsStream", + "listGeneratorsAsync" + ] + } + } + } + } + }, "Intents": { "clients": { "grpc": { @@ -911,6 +979,11 @@ "fulfillIntent" ] }, + "SubmitAnswerFeedback": { + "methods": [ + "submitAnswerFeedback" + ] + }, "StreamingDetectIntent": { "methods": [ "streamingDetectIntent" @@ -935,6 +1008,11 @@ "methods": [ "fulfillIntent" ] + }, + "SubmitAnswerFeedback": { + "methods": [ + "submitAnswerFeedback" + ] } } } diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts new file mode 100644 index 00000000000..da29a229790 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client.ts @@ -0,0 +1,2966 @@ +// Copyright 2023 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, + PaginationCallback, + GaxCall, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v3beta1/generators_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './generators_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing + * {@link protos.google.cloud.dialogflow.cx.v3beta1.Generator|Generators} + * @class + * @memberof v3beta1 + */ +export class GeneratorsClient { + 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}; + 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}; + generatorsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of GeneratorsClient. + * + * @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://developers.google.com/identity/protocols/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 GeneratorsClient({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 GeneratorsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.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 !== 'undefined' && '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}' + ), + 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}' + ), + 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}' + ), + projectLocationAgentFlowTransitionRouteGroupPathTemplate: + 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}' + ), + projectLocationAgentTransitionRouteGroupPathTemplate: + 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}' + ), + 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 = { + listGenerators: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'generators' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dialogflow.cx.v3beta1.Generators', + 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.generatorsStub) { + return this.generatorsStub; + } + + // Put together the "service stub" for + // google.cloud.dialogflow.cx.v3beta1.Generators. + this.generatorsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dialogflow.cx.v3beta1.Generators' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dialogflow.cx.v3beta1.Generators, + 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 generatorsStubMethods = [ + 'listGenerators', + 'getGenerator', + 'createGenerator', + 'updateGenerator', + 'deleteGenerator', + ]; + for (const methodName of generatorsStubMethods) { + const callPromise = this.generatorsStub.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.generatorsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dialogflow.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dialogflow.googleapis.com'; + } + + /** + * 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 -- + // ------------------- + /** + * Retrieves the specified generator. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the generator. + * Format: `projects//locations//agents//generators/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.v3beta1.Generator|Generator}. + * 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/v3beta1/generators.get_generator.js + * region_tag:dialogflow_v3beta1_generated_Generators_GetGenerator_async + */ + getGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | undefined + ), + {} | undefined, + ] + >; + getGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IGetGeneratorRequest + | 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(); + return this.innerApiCalls.getGenerator(request, options, callback); + } + /** + * Creates a generator in the specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to create a generator for. + * Format: `projects//locations//agents/`. + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} request.generator + * Required. The generator to create. + * @param {string} request.languageCode + * The language to create generators for the following fields: + * * `Generator.prompt_text.text` + * If not specified, the agent's default language is 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 an object representing {@link protos.google.cloud.dialogflow.cx.v3beta1.Generator|Generator}. + * 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/v3beta1/generators.create_generator.js + * region_tag:dialogflow_v3beta1_generated_Generators_CreateGenerator_async + */ + createGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | undefined + ), + {} | undefined, + ] + >; + createGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ICreateGeneratorRequest + | 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(); + return this.innerApiCalls.createGenerator(request, options, callback); + } + /** + * Update the specified generator. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.cx.v3beta1.Generator} request.generator + * Required. The generator to update. + * @param {string} request.languageCode + * The language to list generators for. + * @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.v3beta1.Generator|Generator}. + * 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/v3beta1/generators.update_generator.js + * region_tag:dialogflow_v3beta1_generated_Generators_UpdateGenerator_async + */ + updateGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | undefined + ), + {} | undefined, + ] + >; + updateGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IUpdateGeneratorRequest + | 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({ + 'generator.name': request.generator!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGenerator(request, options, callback); + } + /** + * Deletes the specified generators. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the generator to delete. + * Format: `projects//locations//agents//generators/`. + * @param {boolean} request.force + * This field has no effect for generators not being used. + * For generators that are used by pages/flows/transition route groups: + * + * * 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 generator, as well + * as any references to the generator (i.e. + * {@link protos.Fulfillment.generator|Generator}) in fulfillments. + * @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/v3beta1/generators.delete_generator.js + * region_tag:dialogflow_v3beta1_generated_Generators_DeleteGenerator_async + */ + deleteGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | undefined + ), + {} | undefined, + ] + >; + deleteGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGenerator( + request: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGenerator( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.IDeleteGeneratorRequest + | 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(); + return this.innerApiCalls.deleteGenerator(request, options, callback); + } + + /** + * Returns the list of all generators in the specified agent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The agent to list all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.v3beta1.Generator|Generator}. + * 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 `listGeneratorsAsync()` + * 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. + */ + listGenerators( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator[], + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest | null, + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse, + ] + >; + listGenerators( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator + > + ): void; + listGenerators( + request: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + callback: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator + > + ): void; + listGenerators( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator + >, + callback?: PaginationCallback< + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + | protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse + | null + | undefined, + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IGenerator[], + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest | null, + protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsResponse, + ] + > | 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(); + return this.innerApiCalls.listGenerators(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, 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 all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.v3beta1.Generator|Generator} 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 `listGeneratorsAsync()` + * 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. + */ + listGeneratorsStream( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + 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['listGenerators']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGenerators.createStream( + this.innerApiCalls.listGenerators as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listGenerators`, 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 all generators for. + * Format: `projects//locations//agents/`. + * @param {string} request.languageCode + * The language to list generators for. + * @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.v3beta1.Generator|Generator}. 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/v3beta1/generators.list_generators.js + * region_tag:dialogflow_v3beta1_generated_Generators_ListGenerators_async + */ + listGeneratorsAsync( + request?: protos.google.cloud.dialogflow.cx.v3beta1.IListGeneratorsRequest, + 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['listGenerators']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGenerators.asyncIterate( + this.innerApiCalls['listGenerators'] 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); + } + + // -------------------- + // -- 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 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 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 projectLocationAgentFlowTransitionRouteGroup 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. + */ + projectLocationAgentFlowTransitionRouteGroupPath( + project: string, + location: string, + agent: string, + flow: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render( + { + project: project, + location: location, + agent: agent, + flow: flow, + transition_route_group: transitionRouteGroup, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).agent; + } + + /** + * Parse the flow from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the flow. + */ + matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).flow; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentFlowTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentFlowTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_flow_transition_route_group resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName( + projectLocationAgentFlowTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match( + projectLocationAgentFlowTransitionRouteGroupName + ).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 projectLocationAgentTransitionRouteGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} agent + * @param {string} transition_route_group + * @returns {string} Resource name string. + */ + projectLocationAgentTransitionRouteGroupPath( + project: string, + location: string, + agent: string, + transitionRouteGroup: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render( + { + project: project, + location: location, + agent: agent, + transition_route_group: transitionRouteGroup, + } + ); + } + + /** + * Parse the project from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).project; + } + + /** + * Parse the location from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).location; + } + + /** + * Parse the agent from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the agent. + */ + matchAgentFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).agent; + } + + /** + * Parse the transition_route_group from ProjectLocationAgentTransitionRouteGroup resource. + * + * @param {string} projectLocationAgentTransitionRouteGroupName + * A fully-qualified path representing project_location_agent_transition_route_group resource. + * @returns {string} A string representing the transition_route_group. + */ + matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName( + projectLocationAgentTransitionRouteGroupName: string + ) { + return this.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match( + projectLocationAgentTransitionRouteGroupName + ).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 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.generatorsStub && !this._terminated) { + return this.generatorsStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client_config.json new file mode 100644 index 00000000000..a1219057903 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.dialogflow.cx.v3beta1.Generators": { + "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": { + "ListGenerators": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "GetGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "CreateGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "UpdateGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "DeleteGenerator": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_proto_list.json new file mode 100644 index 00000000000..13e2ec7ff8a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/generators_proto_list.json @@ -0,0 +1,30 @@ +[ + "../../protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/agent.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/changelog.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/environment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/flow.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/page.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/safety_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/session.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/version.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto" +] diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/index.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/index.ts index 496a14d56ac..a0f0e112bfa 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/index.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/index.ts @@ -23,6 +23,7 @@ export {EntityTypesClient} from './entity_types_client'; export {EnvironmentsClient} from './environments_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 {SecuritySettingsServiceClient} from './security_settings_service_client'; diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts index 8504ae0c408..a89a2a403a7 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_client.ts @@ -220,6 +220,9 @@ export class IntentsClient { 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}' ), @@ -2529,6 +2532,76 @@ export class IntentsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/intents_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts index 768d63913f3..8a1b071aab3 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_client.ts @@ -217,6 +217,9 @@ export class PagesClient { 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}' ), @@ -1991,6 +1994,76 @@ export class PagesClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/pages_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts index e05e2e60b0d..1ed7762e301 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_client.ts @@ -218,6 +218,9 @@ export class SecuritySettingsServiceClient { 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}' ), @@ -1907,6 +1910,76 @@ export class SecuritySettingsServiceClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/security_settings_service_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts index 68725acb129..c1105278364 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_client.ts @@ -218,6 +218,9 @@ export class SessionEntityTypesClient { 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}' ), @@ -1920,6 +1923,76 @@ export class SessionEntityTypesClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/session_entity_types_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts index b040ae5af7d..b569518607b 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client.ts @@ -218,6 +218,9 @@ export class SessionsClient { 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}' ), @@ -247,6 +250,13 @@ export class SessionsClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/agents/{agent}/transitionRouteGroups/{transition_route_group}' ), + projectLocationCollectionDataStorePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}' + ), + projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}' + ), securitySettingsPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/securitySettings/{security_settings}' ), @@ -327,6 +337,7 @@ export class SessionsClient { 'streamingDetectIntent', 'matchIntent', 'fulfillIntent', + 'submitAnswerFeedback', ]; for (const methodName of sessionsStubMethods) { const callPromise = this.sessionsStub.then( @@ -765,6 +776,111 @@ export class SessionsClient { this.initialize(); return this.innerApiCalls.fulfillIntent(request, options, callback); } + /** + * Updates the feedback received from the user for a single turn of the bot + * response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.session + * Required. The name of the session the feedback was sent to. + * @param {string} request.responseId + * Required. ID of the response to update its feedback. This is the same as + * DetectIntentResponse.response_id. + * @param {google.cloud.dialogflow.cx.v3beta1.AnswerFeedback} request.answerFeedback + * Required. Feedback provided for a bot answer. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The mask to control which fields to update. 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.v3beta1.AnswerFeedback|AnswerFeedback}. + * 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/v3beta1/sessions.submit_answer_feedback.js + * region_tag:dialogflow_v3beta1_generated_Sessions_SubmitAnswerFeedback_async + */ + submitAnswerFeedback( + request?: protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | undefined + ), + {} | undefined, + ] + >; + submitAnswerFeedback( + request: protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): void; + submitAnswerFeedback( + request: protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, + callback: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): void; + submitAnswerFeedback( + request?: protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback, + ( + | protos.google.cloud.dialogflow.cx.v3beta1.ISubmitAnswerFeedbackRequest + | 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({ + session: request.session ?? '', + }); + this.initialize(); + return this.innerApiCalls.submitAnswerFeedback(request, options, callback); + } /** * Processes a natural language query in audio format in a streaming fashion @@ -1660,6 +1776,76 @@ export class SessionsClient { ).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. * @@ -2401,6 +2587,156 @@ export class SessionsClient { ).transition_route_group; } + /** + * Return a fully-qualified projectLocationCollectionDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStorePath( + project: string, + location: string, + collection: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationDataStorePath( + project: string, + location: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.render({ + project: project, + location: location, + data_store: dataStore, + }); + } + + /** + * Parse the project from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).data_store; + } + /** * Return a fully-qualified securitySettings resource name string. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client_config.json index 8650fba2729..b2b20e4b396 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_client_config.json @@ -42,6 +42,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "SubmitAnswerFeedback": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/sessions_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts index 2aaeb5914f7..07448d6a6c3 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_client.ts @@ -222,6 +222,9 @@ export class TestCasesClient { 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}' ), @@ -3274,6 +3277,76 @@ export class TestCasesClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/test_cases_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts index a499e493fbc..119855de41c 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_client.ts @@ -219,6 +219,9 @@ export class TransitionRouteGroupsClient { 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}' ), @@ -2009,6 +2012,76 @@ export class TransitionRouteGroupsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/transition_route_groups_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts index 8a287cc352e..9236689b7d7 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_client.ts @@ -220,6 +220,9 @@ export class VersionsClient { 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}' ), @@ -2442,6 +2445,76 @@ export class VersionsClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/versions_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.proto", diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts index bd41dae6934..306b3e8b962 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_client.ts @@ -217,6 +217,9 @@ export class WebhooksClient { 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}' ), @@ -1882,6 +1885,76 @@ export class WebhooksClient { ).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. * diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json index 336e74c8521..13e2ec7ff8a 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/webhooks_proto_list.json @@ -12,6 +12,7 @@ "../../protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto", + "../../protos/google/cloud/dialogflow/cx/v3beta1/generator.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/import_strategy.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/inline.proto", "../../protos/google/cloud/dialogflow/cx/v3beta1/intent.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 0c36ab3034c..2fe72231233 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 @@ -27,6 +27,7 @@ function main() { const environmentsClient = new cx.EnvironmentsClient(); 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 securitySettingsServiceClient = new cx.SecuritySettingsServiceClient(); 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 c97957406ac..8cd35d76e6b 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 @@ -24,6 +24,7 @@ import { EnvironmentsClient, ExperimentsClient, FlowsClient, + GeneratorsClient, IntentsClient, PagesClient, SecuritySettingsServiceClient, @@ -57,6 +58,9 @@ function doStuffWithExperimentsClient(client: ExperimentsClient) { function doStuffWithFlowsClient(client: FlowsClient) { client.close(); } +function doStuffWithGeneratorsClient(client: GeneratorsClient) { + client.close(); +} function doStuffWithIntentsClient(client: IntentsClient) { client.close(); } @@ -112,6 +116,9 @@ function main() { const flowsClient = new FlowsClient(); doStuffWithFlowsClient(flowsClient); // check that the client instance can be created + const generatorsClient = new GeneratorsClient(); + doStuffWithGeneratorsClient(generatorsClient); + // check that the client instance can be created const intentsClient = new IntentsClient(); doStuffWithIntentsClient(intentsClient); // 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 f53babb29a2..c8425419b95 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3.ts @@ -3423,6 +3423,82 @@ describe('v3.AgentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new agentsModule.v3.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts index f2af96ed0dc..4d9fcabe8a3 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_agents_v3beta1.ts @@ -3448,6 +3448,82 @@ describe('v3beta1.AgentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new agentsModule.v3beta1.AgentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 e92b8745e47..10532031ebb 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3.ts @@ -2090,6 +2090,82 @@ describe('v3.ChangelogsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new changelogsModule.v3.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts index f16490337d8..4ff6e4bf1ec 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_changelogs_v3beta1.ts @@ -1791,6 +1791,82 @@ describe('v3beta1.ChangelogsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new changelogsModule.v3beta1.ChangelogsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 430a2656989..bcb856f6862 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3.ts @@ -2091,6 +2091,82 @@ describe('v3.DeploymentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new deploymentsModule.v3.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts index 00c9c174a1a..20ff6dc1a08 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_deployments_v3beta1.ts @@ -1793,6 +1793,82 @@ describe('v3beta1.DeploymentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new deploymentsModule.v3beta1.DeploymentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 3ea64f0db8c..7998a4a2264 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 @@ -2485,6 +2485,82 @@ describe('v3.EntityTypesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new entitytypesModule.v3.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts index 16e08375adb..1ca741711e6 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_entity_types_v3beta1.ts @@ -2187,6 +2187,82 @@ describe('v3beta1.EntityTypesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new entitytypesModule.v3beta1.EntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 aca3d48840e..0fc15708641 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3.ts @@ -3747,6 +3747,82 @@ describe('v3.EnvironmentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new environmentsModule.v3.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts index 2eda482000b..76bce4f99e0 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_environments_v3beta1.ts @@ -3755,6 +3755,82 @@ describe('v3beta1.EnvironmentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new environmentsModule.v3beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { 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 a68a0f9583a..106da7e596d 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3.ts @@ -2745,6 +2745,82 @@ describe('v3.ExperimentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new experimentsModule.v3.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts index 2643e182249..c52a3ff200f 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_experiments_v3beta1.ts @@ -2447,6 +2447,82 @@ describe('v3beta1.ExperimentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new experimentsModule.v3beta1.ExperimentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 3e175672db6..f533833a9ea 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3.ts @@ -3330,6 +3330,82 @@ describe('v3.FlowsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new flowsModule.v3.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts index bf5190d3667..4f1ffb0efeb 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_flows_v3beta1.ts @@ -3354,6 +3354,82 @@ describe('v3beta1.FlowsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new flowsModule.v3beta1.FlowsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 new file mode 100644 index 00000000000..1f8862ed074 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3.ts @@ -0,0 +1,3714 @@ +// Copyright 2023 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 generatorsModule 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.GeneratorsClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = generatorsModule.v3.GeneratorsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = generatorsModule.v3.GeneratorsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = generatorsModule.v3.GeneratorsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new generatorsModule.v3.GeneratorsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new generatorsModule.v3.GeneratorsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.generatorsStub, undefined); + await client.initialize(); + assert(client.generatorsStub); + }); + + it('has close method for the initialized client', done => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.generatorsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.generatorsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new generatorsModule.v3.GeneratorsClient({ + 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 generatorsModule.v3.GeneratorsClient({ + 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('getGenerator', () => { + it('invokes getGenerator without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.getGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.getGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator without error using callback', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.getGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator with closed client', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getGenerator(request), expectedError); + }); + }); + + describe('createGenerator', () => { + it('invokes createGenerator without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.createGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.createGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator without error using callback', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.createGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator with closed client', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createGenerator(request), expectedError); + }); + }); + + describe('updateGenerator', () => { + it('invokes updateGenerator without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.updateGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.updateGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator without error using callback', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ); + client.innerApiCalls.updateGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator with closed client', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateGenerator(request), expectedError); + }); + }); + + describe('deleteGenerator', () => { + it('invokes deleteGenerator without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.deleteGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator without error using callback', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteGenerator( + 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.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator with closed client', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteGenerator(request), expectedError); + }); + }); + + describe('listGenerators', () => { + it('invokes listGenerators without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + ]; + client.innerApiCalls.listGenerators = stubSimpleCall(expectedResponse); + const [response] = await client.listGenerators(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGenerators without error using callback', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + ]; + client.innerApiCalls.listGenerators = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listGenerators( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IGenerator[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGenerators with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listGenerators = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listGenerators(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGeneratorsStream without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + ]; + client.descriptors.page.listGenerators.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listGeneratorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Generator[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3.Generator) => { + 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.listGenerators.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGenerators, request) + ); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listGeneratorsStream with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGenerators.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listGeneratorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3.Generator[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3.Generator) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGenerators, request) + ); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGenerators without error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.Generator() + ), + ]; + client.descriptors.page.listGenerators.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3.IGenerator[] = []; + const iterable = client.listGeneratorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listGenerators.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGenerators.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGenerators with error', async () => { + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGenerators.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listGeneratorsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3.IGenerator[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listGenerators.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGenerators.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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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); + } + } + ); + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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); + } + } + ); + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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); + } + } + ); + }); + 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 generatorsModule.v3.GeneratorsClient({ + 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 generatorsModule.v3.GeneratorsClient({ + 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.ListOperationsResponse[] = + []; + 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 generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.ListOperationsResponse[] = + []; + 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', () => { + const fakePath = '/rendered/path/agent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/agentGenerativeSettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/agentValidationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/changelog'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + changelog: 'changelogValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/continuousTestResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + continuous_test_result: 'continuousTestResultValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/deployment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + deployment: 'deploymentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/flow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/flowValidationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/intent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + intent: 'intentValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/page'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + page: 'pageValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = + '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('projectLocationAgentFlowTransitionRouteGroup', () => { + const fakePath = + '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentFlowTransitionRouteGroupPath', () => { + const result = client.projectLocationAgentFlowTransitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'flowValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentSessionEntityType', () => { + const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('projectLocationAgentTransitionRouteGroup', () => { + const fakePath = + '/rendered/path/projectLocationAgentTransitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentTransitionRouteGroupPath', () => { + const result = client.projectLocationAgentTransitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchProjectFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchLocationFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchAgentFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('securitySettings', () => { + const fakePath = '/rendered/path/securitySettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + security_settings: 'securitySettingsValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/testCase'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + test_case: 'testCaseValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/testCaseResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + test_case: 'testCaseValue', + result: 'resultValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('version', () => { + const fakePath = '/rendered/path/version'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + version: 'versionValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/webhook'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + webhook: 'webhookValue', + }; + const client = new generatorsModule.v3.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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_generators_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts new file mode 100644 index 00000000000..ce110acb8bf --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/test/gapic_generators_v3beta1.ts @@ -0,0 +1,3415 @@ +// Copyright 2023 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 generatorsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, 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('v3beta1.GeneratorsClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = generatorsModule.v3beta1.GeneratorsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = generatorsModule.v3beta1.GeneratorsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = generatorsModule.v3beta1.GeneratorsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new generatorsModule.v3beta1.GeneratorsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.generatorsStub, undefined); + await client.initialize(); + assert(client.generatorsStub); + }); + + it('has close method for the initialized client', done => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.generatorsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.generatorsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + 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 generatorsModule.v3beta1.GeneratorsClient({ + 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('getGenerator', () => { + it('invokes getGenerator without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.getGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.getGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator without error using callback', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.getGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGenerator with closed client', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.GetGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getGenerator(request), expectedError); + }); + }); + + describe('createGenerator', () => { + it('invokes createGenerator without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.createGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.createGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator without error using callback', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.createGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGenerator with closed client', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.CreateGeneratorRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createGenerator(request), expectedError); + }); + }); + + describe('updateGenerator', () => { + it('invokes updateGenerator without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.updateGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.updateGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator without error using callback', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ); + client.innerApiCalls.updateGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGenerator( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IGenerator | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedHeaderRequestParams = `generator.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGenerator with closed client', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest() + ); + request.generator ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.UpdateGeneratorRequest', + ['generator', 'name'] + ); + request.generator.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateGenerator(request), expectedError); + }); + }); + + describe('deleteGenerator', () => { + it('invokes deleteGenerator without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGenerator = stubSimpleCall(expectedResponse); + const [response] = await client.deleteGenerator(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator without error using callback', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGenerator = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteGenerator( + 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.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGenerator = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteGenerator(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGenerator as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGenerator with closed client', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.DeleteGeneratorRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteGenerator(request), expectedError); + }); + }); + + describe('listGenerators', () => { + it('invokes listGenerators without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + ]; + client.innerApiCalls.listGenerators = stubSimpleCall(expectedResponse); + const [response] = await client.listGenerators(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGenerators without error using callback', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + ]; + client.innerApiCalls.listGenerators = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listGenerators( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dialogflow.cx.v3beta1.IGenerator[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGenerators with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listGenerators = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listGenerators(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGenerators as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGeneratorsStream without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + ]; + client.descriptors.page.listGenerators.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listGeneratorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.Generator[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3beta1.Generator) => { + 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.listGenerators.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGenerators, request) + ); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listGeneratorsStream with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGenerators.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listGeneratorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.Generator[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dialogflow.cx.v3beta1.Generator) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGenerators, request) + ); + assert( + (client.descriptors.page.listGenerators.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGenerators without error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.Generator() + ), + ]; + client.descriptors.page.listGenerators.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dialogflow.cx.v3beta1.IGenerator[] = + []; + const iterable = client.listGeneratorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listGenerators.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGenerators.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGenerators with error', async () => { + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGenerators.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listGeneratorsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dialogflow.cx.v3beta1.IGenerator[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listGenerators.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGenerators.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 generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('Path templates', () => { + describe('agent', () => { + const fakePath = '/rendered/path/agent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/agentGenerativeSettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/agentValidationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/changelog'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + changelog: 'changelogValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/continuousTestResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + continuous_test_result: 'continuousTestResultValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/deployment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + deployment: 'deploymentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('experiment', () => { + const fakePath = '/rendered/path/experiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + experiment: 'experimentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/flow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/flowValidationResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/intent'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + intent: 'intentValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/page'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + page: 'pageValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = + '/rendered/path/projectLocationAgentEnvironmentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + environment: 'environmentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('projectLocationAgentFlowTransitionRouteGroup', () => { + const fakePath = + '/rendered/path/projectLocationAgentFlowTransitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentFlowTransitionRouteGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentFlowTransitionRouteGroupPath', () => { + const result = client.projectLocationAgentFlowTransitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'flowValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchProjectFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchLocationFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchAgentFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchFlowFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'flowValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName', () => { + const result = + client.matchTransitionRouteGroupFromProjectLocationAgentFlowTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentFlowTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationAgentSessionEntityType', () => { + const fakePath = '/rendered/path/projectLocationAgentSessionEntityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + session: 'sessionValue', + entity_type: 'entityTypeValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('projectLocationAgentTransitionRouteGroup', () => { + const fakePath = + '/rendered/path/projectLocationAgentTransitionRouteGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + transition_route_group: 'transitionRouteGroupValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationAgentTransitionRouteGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationAgentTransitionRouteGroupPath', () => { + const result = client.projectLocationAgentTransitionRouteGroupPath( + 'projectValue', + 'locationValue', + 'agentValue', + 'transitionRouteGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchProjectFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchLocationFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAgentFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchAgentFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'agentValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName', () => { + const result = + client.matchTransitionRouteGroupFromProjectLocationAgentTransitionRouteGroupName( + fakePath + ); + assert.strictEqual(result, 'transitionRouteGroupValue'); + assert( + ( + client.pathTemplates + .projectLocationAgentTransitionRouteGroupPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('securitySettings', () => { + const fakePath = '/rendered/path/securitySettings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + security_settings: 'securitySettingsValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/testCase'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + test_case: 'testCaseValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/testCaseResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + test_case: 'testCaseValue', + result: 'resultValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('version', () => { + const fakePath = '/rendered/path/version'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + flow: 'flowValue', + version: 'versionValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/webhook'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + webhook: 'webhookValue', + }; + const client = new generatorsModule.v3beta1.GeneratorsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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_intents_v3.ts b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts index 051df790e20..7456cbe5640 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3.ts @@ -2910,6 +2910,82 @@ describe('v3.IntentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new intentsModule.v3.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts index c25bb2fd99d..aba18825715 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_intents_v3beta1.ts @@ -2913,6 +2913,82 @@ describe('v3beta1.IntentsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new intentsModule.v3beta1.IntentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 c86c0279908..70be097b794 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3.ts @@ -2456,6 +2456,82 @@ describe('v3.PagesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new pagesModule.v3.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts index 52082b341cb..9bcc48a4bd4 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_pages_v3beta1.ts @@ -2175,6 +2175,82 @@ describe('v3beta1.PagesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new pagesModule.v3beta1.PagesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { 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 8d67dd938f0..d7c3307bc94 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 @@ -2575,6 +2575,83 @@ describe('v3.SecuritySettingsServiceClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = + new securitysettingsserviceModule.v3.SecuritySettingsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts index 635cf24c6bb..f4fcc3eb584 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_security_settings_service_v3beta1.ts @@ -2354,6 +2354,85 @@ describe('v3beta1.SecuritySettingsServiceClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = + new securitysettingsserviceModule.v3beta1.SecuritySettingsServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + 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', () => { const fakePath = '/rendered/path/intent'; 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 ce3b97dbd9c..54da89286de 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 @@ -2542,6 +2542,82 @@ describe('v3.SessionEntityTypesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new sessionentitytypesModule.v3.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts index c3bcc657399..4751f80a8b3 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_session_entity_types_v3beta1.ts @@ -2284,6 +2284,83 @@ describe('v3beta1.SessionEntityTypesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = + new sessionentitytypesModule.v3beta1.SessionEntityTypesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 a453d7d1186..76b06bc1e52 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3.ts @@ -595,6 +595,137 @@ describe('v3.SessionsClient', () => { }); }); + describe('submitAnswerFeedback', () => { + it('invokes submitAnswerFeedback without error', async () => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.AnswerFeedback() + ); + client.innerApiCalls.submitAnswerFeedback = + stubSimpleCall(expectedResponse); + const [response] = await client.submitAnswerFeedback(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback without error using callback', async () => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.AnswerFeedback() + ); + client.innerApiCalls.submitAnswerFeedback = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.submitAnswerFeedback( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3.IAnswerFeedback | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback with error', async () => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.submitAnswerFeedback = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.submitAnswerFeedback(request), expectedError); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback with closed client', async () => { + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.submitAnswerFeedback(request), expectedError); + }); + }); + describe('streamingDetectIntent', () => { it('invokes streamingDetectIntent without error', async () => { const client = new sessionsModule.v3.SessionsClient({ @@ -2095,6 +2226,82 @@ describe('v3.SessionsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { @@ -2982,6 +3189,186 @@ describe('v3.SessionsClient', () => { }); }); + describe('projectLocationCollectionDataStore', () => { + const fakePath = '/rendered/path/projectLocationCollectionDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStorePath', () => { + const result = client.projectLocationCollectionDataStorePath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStore', () => { + const fakePath = '/rendered/path/projectLocationDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + }; + const client = new sessionsModule.v3.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationDataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationDataStorePath', () => { + const result = client.projectLocationDataStorePath( + 'projectValue', + 'locationValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('securitySettings', () => { const fakePath = '/rendered/path/securitySettings'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts index 1858833d59a..3dbc8c75b8b 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_sessions_v3beta1.ts @@ -595,6 +595,137 @@ describe('v3beta1.SessionsClient', () => { }); }); + describe('submitAnswerFeedback', () => { + it('invokes submitAnswerFeedback without error', async () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback() + ); + client.innerApiCalls.submitAnswerFeedback = + stubSimpleCall(expectedResponse); + const [response] = await client.submitAnswerFeedback(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback without error using callback', async () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback() + ); + client.innerApiCalls.submitAnswerFeedback = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.submitAnswerFeedback( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.cx.v3beta1.IAnswerFeedback | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback with error', async () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedHeaderRequestParams = `session=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.submitAnswerFeedback = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.submitAnswerFeedback(request), expectedError); + const actualRequest = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitAnswerFeedback as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitAnswerFeedback with closed client', async () => { + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest', + ['session'] + ); + request.session = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.submitAnswerFeedback(request), expectedError); + }); + }); + describe('streamingDetectIntent', () => { it('invokes streamingDetectIntent without error', async () => { const client = new sessionsModule.v3beta1.SessionsClient({ @@ -1790,6 +1921,82 @@ describe('v3beta1.SessionsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { @@ -2677,6 +2884,186 @@ describe('v3beta1.SessionsClient', () => { }); }); + describe('projectLocationCollectionDataStore', () => { + const fakePath = '/rendered/path/projectLocationCollectionDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + }; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStorePath', () => { + const result = client.projectLocationCollectionDataStorePath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStore', () => { + const fakePath = '/rendered/path/projectLocationDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + }; + const client = new sessionsModule.v3beta1.SessionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationDataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationDataStorePath', () => { + const result = client.projectLocationDataStorePath( + 'projectValue', + 'locationValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('securitySettings', () => { const fakePath = '/rendered/path/securitySettings'; 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 a7c662256be..5924ed30e2a 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 @@ -3886,6 +3886,82 @@ describe('v3.TestCasesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new testcasesModule.v3.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts index b6cf320e1b2..e9c04be4062 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_test_cases_v3beta1.ts @@ -3896,6 +3896,82 @@ describe('v3beta1.TestCasesClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new testcasesModule.v3beta1.TestCasesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { 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 4a249a0b69b..8df1a4e86aa 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 @@ -2606,6 +2606,83 @@ describe('v3.TransitionRouteGroupsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = + new transitionroutegroupsModule.v3.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts index 111bf474838..41c1495f841 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_transition_route_groups_v3beta1.ts @@ -2292,6 +2292,83 @@ describe('v3beta1.TransitionRouteGroupsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = + new transitionroutegroupsModule.v3beta1.TransitionRouteGroupsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 48904ede5a3..a4c794fb1c8 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3.ts @@ -2907,6 +2907,82 @@ describe('v3.VersionsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new versionsModule.v3.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts index 5a8eae55f31..190295b6f80 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_versions_v3beta1.ts @@ -2911,6 +2911,82 @@ describe('v3beta1.VersionsClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new versionsModule.v3beta1.VersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; 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 f54f8f9013e..8c308d9e244 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3.ts @@ -2486,6 +2486,82 @@ describe('v3.WebhooksClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new webhooksModule.v3.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts index 4ef73f0ce5f..fe6a7d5c055 100644 --- a/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts +++ b/packages/google-cloud-dialogflow-cx/test/gapic_webhooks_v3beta1.ts @@ -2185,6 +2185,82 @@ describe('v3beta1.WebhooksClient', () => { }); }); + describe('generator', () => { + const fakePath = '/rendered/path/generator'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + agent: 'agentValue', + generator: 'generatorValue', + }; + const client = new webhooksModule.v3beta1.WebhooksClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { const fakePath = '/rendered/path/intent'; const expectedParameters = {